]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-09-02 Colin Watson <cjwatson@ubuntu.com>
authorcjwatson <cjwatson@localhost>
Wed, 2 Sep 2009 01:42:06 +0000 (01:42 +0000)
committercjwatson <cjwatson@localhost>
Wed, 2 Sep 2009 01:42:06 +0000 (01:42 +0000)
* util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
rather than comparing against S_IFREG, which will almost never work.

ChangeLog
util/grub-probe.c

index d8c75dfabe33af7589090138750f7607f0ea39bc..209a9e29c2f1188447f04825defe2d6d76ee0a9c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
+
+       * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
+       rather than comparing against S_IFREG, which will almost never work.
+
 2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * commands/loadenv.c (check_blocklists): Fix off-by-one error.
index 1710ec51b336f104af06d190decf93815403236e..3c54408c3a40e3cbb3270c974ed6c941c04657eb 100644 (file)
@@ -239,7 +239,7 @@ probe (const char *path, char *device_name)
 
       stat (path, &st);
 
-      if (st.st_mode == S_IFREG)
+      if (S_ISREG (st.st_mode))
        {
          /* Regular file.  Verify that we can read it properly.  */