diff options
author | Daniel Eischen <deischen@FreeBSD.org> | 2000-12-06 03:14:28 +0000 |
---|---|---|
committer | Daniel Eischen <deischen@FreeBSD.org> | 2000-12-06 03:14:28 +0000 |
commit | 9b8551d0a5a8c9210cceeb570ab35efa1a111974 (patch) | |
tree | 73bc3b34cc4e61971af9e5a4b2d3ebacc205f51a /include/dirent.h | |
parent | 495c2d2085db31a234439c4872abed79e1f2a2a7 (diff) | |
download | src-9b8551d0a5a8c9210cceeb570ab35efa1a111974.tar.gz src-9b8551d0a5a8c9210cceeb570ab35efa1a111974.zip |
Add a LIST_HEAD to DIR for a queue of telldir positions.
Also add a location count (used as the magic for telldir)
to DIR. A future change will also add a mutex/lock.
Notes
Notes:
svn path=/head/; revision=69655
Diffstat (limited to 'include/dirent.h')
-rw-r--r-- | include/dirent.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/dirent.h b/include/dirent.h index 97095135a406..d24c1467bed6 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -42,6 +42,7 @@ * the getdirentries(2) system call. */ #include <sys/dirent.h> +#include <sys/queue.h> #ifdef _POSIX_SOURCE typedef void * DIR; @@ -52,6 +53,8 @@ typedef void * DIR; /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 +struct _ddloc; + /* structure describing an open directory. */ typedef struct _dirdesc { int dd_fd; /* file descriptor associated with directory */ @@ -62,6 +65,8 @@ typedef struct _dirdesc { long dd_seek; /* magic cookie returned by getdirentries */ long dd_rewind; /* magic cookie for rewinding */ int dd_flags; /* flags for readdir */ + long dd_loccnt; /* Index of entry for sequential readdir's */ + LIST_HEAD(, _ddloc) dd_locq; /* telldir position recording */ } DIR; #define dirfd(dirp) ((dirp)->dd_fd) @@ -89,7 +94,7 @@ void rewinddir __P((DIR *)); int closedir __P((DIR *)); #ifndef _POSIX_SOURCE DIR *__opendir2 __P((const char *, int)); -long telldir __P((const DIR *)); +long telldir __P((DIR *)); void seekdir __P((DIR *, long)); int scandir __P((const char *, struct dirent ***, int (*)(struct dirent *), int (*)(const void *, const void *))); |