projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
document macro dirfd; bug report 4.1BSD/sys/31
[unix-history]
/
usr
/
src
/
lib
/
libc
/
gen
/
directory.3
diff --git
a/usr/src/lib/libc/gen/directory.3
b/usr/src/lib/libc/gen/directory.3
index
7f1f333
..
43e0d0c
100644
(file)
--- a/
usr/src/lib/libc/gen/directory.3
+++ b/
usr/src/lib/libc/gen/directory.3
@@
-2,14
+2,15
@@
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
-.\" @(#)directory.3 6.
1
(Berkeley) %G%
+.\" @(#)directory.3 6.
3
(Berkeley) %G%
.\"
.TH DIRECTORY 3 ""
.UC 5
.SH NAME
.\"
.TH DIRECTORY 3 ""
.UC 5
.SH NAME
-opendir, readdir, telldir, seekdir, rewinddir, closedir \- directory operations
+opendir, readdir, telldir, seekdir, rewinddir, closedir
, dirfd
\- directory operations
.SH SYNOPSIS
.B #include <sys/types.h>
.SH SYNOPSIS
.B #include <sys/types.h>
+.br
.B #include <sys/dir.h>
.PP
.SM
.B #include <sys/dir.h>
.PP
.SM
@@
-51,6
+52,12
@@
opendir, readdir, telldir, seekdir, rewinddir, closedir \- directory operations
.SM
.B DIR
.B *dirp;
.SM
.B DIR
.B *dirp;
+.PP
+.B dirfd(dirp)
+.br
+.SM
+.B DIR
+.B *dirp;
.SH DESCRIPTION
.I Opendir
opens the directory named by
.SH DESCRIPTION
.I Opendir
opens the directory named by
@@
-113,6
+120,11
@@
closes the named
.I directory stream
and frees the structure associated with the DIR pointer.
.PP
.I directory stream
and frees the structure associated with the DIR pointer.
.PP
+.I Dirfd
+returns the integer file descriptor associated with the named
+.I directory stream,
+see open(2).
+.PP
Sample code which searchs a directory for entry ``name'' is:
.PP
.br
Sample code which searchs a directory for entry ``name'' is:
.PP
.br