From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mieuj-0001gq-4J for mharc-grub-devel@gnu.org; Tue, 01 Sep 2009 21:45:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mieuh-0001fH-2W for grub-devel@gnu.org; Tue, 01 Sep 2009 21:45:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mieuc-0001aE-L1 for grub-devel@gnu.org; Tue, 01 Sep 2009 21:45:30 -0400 Received: from [199.232.76.173] (port=58257 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mieuc-0001Zp-91 for grub-devel@gnu.org; Tue, 01 Sep 2009 21:45:26 -0400 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:49610) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mieub-0004lm-MO for grub-devel@gnu.org; Tue, 01 Sep 2009 21:45:25 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1Mieua-0004Dx-QY for grub-devel@gnu.org; Wed, 02 Sep 2009 01:45:24 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1Mieua-0005kJ-00; Wed, 02 Sep 2009 02:45:24 +0100 Date: Wed, 2 Sep 2009 02:45:24 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20090902014523.GL13423@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Fix 'grub-probe -t fs' to do the comparison test it's meant to do 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: Wed, 02 Sep 2009 01:45:31 -0000 I just committed this bug fix. It seemed obvious enough that it didn't need to be posted for review first. (If that was wrong, I'm sorry and I'll adjust my practices in future.) However, since it arranges to do a test that was clearly always meant to be performed but never was, it's theoretically possible that it may cause previously-"working" cases to fail due to the extra strictness; so I thought I'd post it here in case it helps anyone out. 2009-09-02 Colin Watson * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro rather than comparing against S_IFREG, which will almost never work. Index: util/grub-probe.c =================================================================== --- util/grub-probe.c (revision 2557) +++ util/grub-probe.c (working copy) @@ -239,7 +239,7 @@ stat (path, &st); - if (st.st_mode == S_IFREG) + if (S_ISREG (st.st_mode)) { /* Regular file. Verify that we can read it properly. */ Thanks, -- Colin Watson [cjwatson@ubuntu.com]