summaryrefslogtreecommitdiffstats
path: root/include/dirent.h
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2000-12-06 03:14:28 +0000
committerdeischen <deischen@FreeBSD.org>2000-12-06 03:14:28 +0000
commit507950431dac1887fe7f639efde6d9a3bcdb790f (patch)
tree7b194049c2249375037ede857dcc25eb89ab38a2 /include/dirent.h
parentd096b69c0b828162b68f5ebbced4d746b203b684 (diff)
downloadFreeBSD-src-507950431dac1887fe7f639efde6d9a3bcdb790f.zip
FreeBSD-src-507950431dac1887fe7f639efde6d9a3bcdb790f.tar.gz
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.
Diffstat (limited to 'include/dirent.h')
-rw-r--r--include/dirent.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/dirent.h b/include/dirent.h
index 9709513..d24c146 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 *)));
OpenPOWER on IntegriCloud