From owner-trustedbsd-cvs@FreeBSD.ORG Tue May 16 20:00:58 2006 Return-Path: X-Original-To: trustedbsd-cvs@freebsd.org Delivered-To: trustedbsd-cvs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65D8916A692 for ; Tue, 16 May 2006 20:00:56 +0000 (UTC) (envelope-from owner-perforce@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC67F43D73 for ; Tue, 16 May 2006 20:00:43 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by cyrus.watson.org (Postfix) with ESMTP id A6B7246C58 for ; Tue, 16 May 2006 16:00:42 -0400 (EDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 4371456CD7; Tue, 16 May 2006 19:57:54 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F50D16A96D; Tue, 16 May 2006 19:57:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75A0A16A942 for ; Tue, 16 May 2006 19:57:51 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D0C243D55 for ; Tue, 16 May 2006 19:57:51 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4GJvXuI082199 for ; Tue, 16 May 2006 19:57:33 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4GJvXE0082196 for perforce@freebsd.org; Tue, 16 May 2006 19:57:33 GMT (envelope-from millert@freebsd.org) Date: Tue, 16 May 2006 19:57:33 GMT Message-Id: <200605161957.k4GJvXE0082196@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 97291 for review X-BeenThere: trustedbsd-cvs@FreeBSD.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: TrustedBSD CVS and Perforce commit message list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2006 20:00:59 -0000 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 #include #include -#include 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); }