From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 17 13:03:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03542FD; Mon, 17 Dec 2012 13:03:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DA3D48FC15; Mon, 17 Dec 2012 13:03:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHD3DBw090772; Mon, 17 Dec 2012 13:03:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBHD3D0X090771; Mon, 17 Dec 2012 13:03:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201212171303.qBHD3D0X090771@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 17 Dec 2012 13:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244359 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 13:03:14 -0000 Author: jilles Date: Mon Dec 17 13:03:13 2012 New Revision: 244359 URL: http://svnweb.freebsd.org/changeset/base/244359 Log: MFC r239151: ftw(): Do not check the maxfds argument against OPEN_MAX. Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX does not require us to check this. POSIX does have a requirement on the application that maxfds not exceed {OPEN_MAX}, but does not require the implementation to check it ("may fail"). PR: 95239 Modified: stable/9/lib/libc/gen/ftw.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/ftw.c ============================================================================== --- stable/9/lib/libc/gen/ftw.c Mon Dec 17 12:57:36 2012 (r244358) +++ stable/9/lib/libc/gen/ftw.c Mon Dec 17 13:03:13 2012 (r244359) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), @@ -40,7 +39,7 @@ ftw(const char *path, int (*fn)(const ch int error = 0, fnflag, sverrno; /* XXX - nfds is currently unused */ - if (nfds < 1 || nfds > OPEN_MAX) { + if (nfds < 1) { errno = EINVAL; return (-1); }