PERFORCE change 97291 for review
Todd Miller
millert at FreeBSD.org
Tue May 16 20:00:59 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=97291
Change 97291 by millert at millert_p4 on 2006/05/16 19:56:34
nftw(3) should not be limited by OPEN_MAN
Affected files ...
.. //depot/projects/trustedbsd/sebsd/lib/libc/gen/ftw.3#3 edit
.. //depot/projects/trustedbsd/sebsd/lib/libc/gen/nftw.c#2 edit
Differences ...
==== //depot/projects/trustedbsd/sebsd/lib/libc/gen/ftw.3#3 (text+ko) ====
@@ -185,7 +185,10 @@
.It Bq Er EINVAL
The
.Fa maxfds
-argument is less than 1.
+argument is less than 1 or, in the case of
+.Nm ftw
+only, greater than
+.Dv OPEN_MAX .
.El
.Sh SEE ALSO
.Xr chdir 2 ,
==== //depot/projects/trustedbsd/sebsd/lib/libc/gen/nftw.c#2 (text+ko) ====
@@ -34,7 +34,6 @@
#include <errno.h>
#include <fts.h>
#include <ftw.h>
-#include <limits.h>
int
nftw(const char *path, int (*fn)(const char *, const struct stat *, int,
@@ -47,7 +46,7 @@
int error = 0, ftsflags, fnflag, postorder, sverrno;
/* XXX - nfds is currently unused */
- if (nfds < 1 || nfds > OPEN_MAX) {
+ if (nfds < 1) {
errno = EINVAL;
return (-1);
}
More information about the trustedbsd-cvs
mailing list