diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man5/dir.5 | 26 | ||||
-rw-r--r-- | share/man/man9/VOP_LOOKUP.9 | 20 |
2 files changed, 16 insertions, 30 deletions
diff --git a/share/man/man5/dir.5 b/share/man/man5/dir.5 index aae4d266396..4cc19b6a077 100644 --- a/share/man/man5/dir.5 +++ b/share/man/man5/dir.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dir.5,v 1.16 2012/04/13 08:20:15 matthew Exp $ +.\" $OpenBSD: dir.5,v 1.17 2013/10/07 01:50:26 guenther Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)dir.5 8.4 (Berkeley) 5/3/95 .\" -.Dd $Mdocdate: April 13 2012 $ +.Dd $Mdocdate: October 7 2013 $ .Dt DIR 5 .Os .Sh NAME @@ -37,7 +37,6 @@ .Nm dirent .Nd directory file format .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <dirent.h> .Sh DESCRIPTION Directories provide a convenient hierarchical method of grouping @@ -75,13 +74,14 @@ The directory entry format is defined in the file /* * A directory entry has a struct dirent at the front of it, containing * its inode number, the length of the entry, and the length of the name - * contained in the entry. These are followed by the name padded to a 4 - * byte boundary with null bytes. All names are guaranteed NUL terminated. - * The maximum length of a name in a directory is MAXNAMLEN. + * contained in the entry. These are followed by the name padded to some + * alignment (currently 8 bytes) with NUL bytes. All names are guaranteed + * NUL terminated. The maximum length of a name in a directory is MAXNAMLEN. */ struct dirent { - u_int32_t d_fileno; /* file number of entry */ + ino_t d_fileno; /* file number of entry */ + off_t d_off; /* offset of next entry */ u_int16_t d_reclen; /* length of this record */ u_int8_t d_type; /* file type, see below */ u_int8_t d_namlen; /* length of string in d_name */ @@ -102,15 +102,9 @@ struct dirent { #define DT_REG 8 #define DT_LNK 10 #define DT_SOCK 12 - -/* - * Convert between stat structure types and directory types. - */ -#define IFTODT(mode) (((mode) & 0170000) >> 12) -#define DTTOIF(dirtype) ((dirtype) << 12) .Ed .Sh SEE ALSO -.Xr getdirentries 2 , +.Xr getdents 2 , .Xr fs 5 , .Xr inode 5 .Sh HISTORY @@ -118,3 +112,7 @@ A .Nm dir file format appeared in .At v7 . +The +.Fa d_off +member was added in +.Ox 5.5 . diff --git a/share/man/man9/VOP_LOOKUP.9 b/share/man/man9/VOP_LOOKUP.9 index 624991d7767..7a63125f820 100644 --- a/share/man/man9/VOP_LOOKUP.9 +++ b/share/man/man9/VOP_LOOKUP.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: VOP_LOOKUP.9,v 1.24 2013/06/11 16:42:05 deraadt Exp $ +.\" $OpenBSD: VOP_LOOKUP.9,v 1.25 2013/10/07 01:50:26 guenther Exp $ .\" .\" Copyright (c) 2003 Ted Unangst .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 11 2013 $ +.Dd $Mdocdate: October 7 2013 $ .Dt VOP_LOOKUP 9 .Os .Sh NAME @@ -182,8 +182,6 @@ .Fa "struct uio *uio" .Fa "struct ucred *cred" .Fa "int *eofflag" -.Fa "int *ncookies" -.Fa "u_long **cookies" .Fc .Ft int .Fo VOP_READLINK @@ -671,13 +669,13 @@ Do I/O as an atomic unit. Upon success, zero is returned; otherwise, an appropriate error code is returned. .Pp -.It Fn VOP_READDIR vp uio cred eofflag ncookies cookies +.It Fn VOP_READDIR vp uio cred eofflag Read the contents of the directory associated with the locked vnode .Fa vp , usually via .Fn VOP_READ , and convert its file-system-specific format to that expected by the -.Xr getdirentries 2 +.Xr getdents 2 system call, storing the result into the buffers specified by .Fa uio . .Fa cred @@ -686,16 +684,6 @@ specifies the credentials of the calling process. is set to a non-zero value on return once successful end-of-file for the directory contents has been reached. .Pp -.Fa ncookies -and -.Fa cookies , -if not -.Dv NULL , -are used for keeping track of directory seeking. -This is used by some file systems, such as -.Tn NFS , -to allow sequential chunks of the directory contents to be obtained. -.Pp Upon success, zero is returned; otherwise, an appropriate error code is returned. .Pp |