Deleted Added
full compact
dirent.h (69655) dirent.h (69841)
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)dirent.h 8.2 (Berkeley) 7/28/94
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)dirent.h 8.2 (Berkeley) 7/28/94
34 * $FreeBSD: head/include/dirent.h 69655 2000-12-06 03:14:28Z deischen $
34 * $FreeBSD: head/include/dirent.h 69841 2000-12-11 04:00:36Z deischen $
35 */
36
37#ifndef _DIRENT_H_
38#define _DIRENT_H_
39
40/*
41 * The kernel defines the format of directory entries returned by
42 * the getdirentries(2) system call.
43 */
44#include <sys/dirent.h>
35 */
36
37#ifndef _DIRENT_H_
38#define _DIRENT_H_
39
40/*
41 * The kernel defines the format of directory entries returned by
42 * the getdirentries(2) system call.
43 */
44#include <sys/dirent.h>
45#include <sys/queue.h>
46
47#ifdef _POSIX_SOURCE
48typedef void * DIR;
49#else
50
51#define d_ino d_fileno /* backward compatibility */
52
53/* definitions for library routines operating on directories. */
54#define DIRBLKSIZ 1024
55
45
46#ifdef _POSIX_SOURCE
47typedef void * DIR;
48#else
49
50#define d_ino d_fileno /* backward compatibility */
51
52/* definitions for library routines operating on directories. */
53#define DIRBLKSIZ 1024
54
56struct _ddloc;
55struct _telldir; /* see telldir.h */
57
58/* structure describing an open directory. */
59typedef struct _dirdesc {
60 int dd_fd; /* file descriptor associated with directory */
61 long dd_loc; /* offset in current buffer */
62 long dd_size; /* amount of data returned by getdirentries */
63 char *dd_buf; /* data buffer */
64 int dd_len; /* size of data buffer */
65 long dd_seek; /* magic cookie returned by getdirentries */
66 long dd_rewind; /* magic cookie for rewinding */
67 int dd_flags; /* flags for readdir */
56
57/* structure describing an open directory. */
58typedef struct _dirdesc {
59 int dd_fd; /* file descriptor associated with directory */
60 long dd_loc; /* offset in current buffer */
61 long dd_size; /* amount of data returned by getdirentries */
62 char *dd_buf; /* data buffer */
63 int dd_len; /* size of data buffer */
64 long dd_seek; /* magic cookie returned by getdirentries */
65 long dd_rewind; /* magic cookie for rewinding */
66 int dd_flags; /* flags for readdir */
68 long dd_loccnt; /* Index of entry for sequential readdir's */
69 LIST_HEAD(, _ddloc) dd_locq; /* telldir position recording */
67 struct _telldir *dd_td; /* telldir position recording */
70} DIR;
71
72#define dirfd(dirp) ((dirp)->dd_fd)
73
74/* flags for opendir2 */
75#define DTF_HIDEW 0x0001 /* hide whiteout entries */
76#define DTF_NODUP 0x0002 /* don't return duplicate names */
77#define DTF_REWIND 0x0004 /* rewind after reading union stack */

--- 33 unchanged lines hidden ---
68} DIR;
69
70#define dirfd(dirp) ((dirp)->dd_fd)
71
72/* flags for opendir2 */
73#define DTF_HIDEW 0x0001 /* hide whiteout entries */
74#define DTF_NODUP 0x0002 /* don't return duplicate names */
75#define DTF_REWIND 0x0004 /* rewind after reading union stack */

--- 33 unchanged lines hidden ---