From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MUk1n-0005i2-3Y for mharc-grub-devel@gnu.org; Sat, 25 Jul 2009 12:23:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MUk1l-0005hx-EX for grub-devel@gnu.org; Sat, 25 Jul 2009 12:23:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUk1g-0005hc-Ms for grub-devel@gnu.org; Sat, 25 Jul 2009 12:23:16 -0400 Received: from [199.232.76.173] (port=37575 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUk1g-0005hZ-Gh for grub-devel@gnu.org; Sat, 25 Jul 2009 12:23:12 -0400 Received: from aybabtu.com ([69.60.117.155]:40737) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MUk1g-0003ii-4u for grub-devel@gnu.org; Sat, 25 Jul 2009 12:23:12 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MUivc-00028x-Rh for grub-devel@gnu.org; Sat, 25 Jul 2009 17:12:53 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MUk1d-0003Gz-OE for grub-devel@gnu.org; Sat, 25 Jul 2009 18:23:09 +0200 Date: Sat, 25 Jul 2009 18:23:09 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090725162309.GH12326@thorin> References: <1248386224.2661.118.camel@mj> <4A6A2165.3070100@t-online.de> <1248472159.4713.8.camel@mj> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1248472159.4713.8.camel@mj> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) Subject: Re: [BUGFIX] Don't use DT_DIR: It doesn't work on non-ext* filesystems X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2009 16:23:18 -0000 On Fri, Jul 24, 2009 at 05:49:19PM -0400, Pavel Roskin wrote: > On Fri, 2009-07-24 at 23:02 +0200, Christian Franke wrote: > > > A correct performance-aware solution would look like: > > > > #ifdef DT_DIR > > if (de->d_type == DT_DIR) > > info.dir = 1; > > else if (de->type == DT_FILE) > > There in no DT_FILE in glibc, but there is DT_REG. DT_UNKNOWN is > present. Perhaps the above line should be > > else if (de->type != DT_UNKNOWN) > > We only care if it's a directory or not. All other objects can be > treated like files. > > I'm fine either way, whether we fix the "high-performance" code or > remove it, as long as we don't have to add more checks. d_type doesn't always exist. E.g. on OpenSolaris. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."