[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix 'grub-probe -t fs' to do the comparison test it's meant to do
From: |
Colin Watson |
Subject: |
Fix 'grub-probe -t fs' to do the comparison test it's meant to do |
Date: |
Wed, 2 Sep 2009 02:45:24 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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 <address@hidden>
* 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 address@hidden
- Fix 'grub-probe -t fs' to do the comparison test it's meant to do,
Colin Watson <=