From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 30 15:54:23 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B76E106564A for ; Tue, 30 Nov 2010 15:54:23 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (ns1.bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id 408D38FC0A for ; Tue, 30 Nov 2010 15:54:23 +0000 (UTC) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 6340C5B73; Tue, 30 Nov 2010 07:54:21 -0800 (PST) To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-reply-to: Your message of "Tue, 30 Nov 2010 12:33:54 +0100." <86zksrm4f1.fsf@ds4.des.no> References: <86r5e3zye4.fsf@pluton.xbsd.name> <4CF40F8F.30303@feral.com> <20101129221648.159C45B18@mail.bitblocks.com> <86zksrm4f1.fsf@ds4.des.no> Comments: In-reply-to =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= message dated "Tue, 30 Nov 2010 12:33:54 +0100." Date: Tue, 30 Nov 2010 07:54:21 -0800 From: Bakul Shah Message-Id: <20101130155421.6340C5B73@mail.bitblocks.com> Cc: freebsd-hackers@freebsd.org, Matthew Jacob Subject: Re: find(1): Is this a bug or not? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2010 15:54:23 -0000 On Tue, 30 Nov 2010 12:33:54 +0100 =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= wrote: > Bakul Shah writes: > > Index: function.c > > --- function.c (revision 212707) > > +++ function.c (working copy) > > @@ -560,7 +560,7 @@ > > empty = 1; > > dir = opendir(entry->fts_accpath); > > if (dir == NULL) > > - err(1, "%s", entry->fts_accpath); > > + return 0; > > for (dp = readdir(dir); dp; dp = readdir(dir)) > > if (dp->d_name[0] != '.' || > > (dp->d_name[1] != '\0' && > > You should replace the err() call with a warn() call instead of removing > it outright. That would print the err msg twice as opendir (or something) already seems to report the error. Try it!