[2558] 2009-09-02 Colin Watson <[email protected]>

Colin Watson <[email protected]> Wed, 02 Sep 2009 01:42:07 +0000
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2558
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2558
Author:   cjwatson
Date:     2009-09-02 01:42:06 +0000 (Wed, 02 Sep 2009)
Log Message:
-----------
2009-09-02  Colin Watson  <[email protected]>

	* util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
	rather than comparing against S_IFREG, which will almost never work.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/util/grub-probe.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-09-01 19:07:42 UTC (rev 2557)
+++ trunk/grub2/ChangeLog	2009-09-02 01:42:06 UTC (rev 2558)
@@ -1,3 +1,8 @@
+2009-09-02  Colin Watson  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* commands/loadenv.c (check_blocklists): Fix off-by-one error.

Modified: trunk/grub2/util/grub-probe.c
===================================================================
--- trunk/grub2/util/grub-probe.c	2009-09-01 19:07:42 UTC (rev 2557)
+++ trunk/grub2/util/grub-probe.c	2009-09-02 01:42:06 UTC (rev 2558)
@@ -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.  */