Date: Tue, 16 May 2006 19:57:33 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 97291 for review Message-ID: <200605161957.k4GJvXE0082196@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=97291 Change 97291 by millert@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605161957.k4GJvXE0082196>