From: cjwatson Date: Wed, 2 Sep 2009 01:42:06 +0000 (+0000) Subject: 2009-09-02 Colin Watson X-Git-Tag: 1.98~569 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0bc232b724bd6b339906a42d9ebbb57cd31b755;p=thirdparty%2Fgrub.git 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. --- diff --git a/ChangeLog b/ChangeLog index d8c75dfab..209a9e29c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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. + 2009-09-01 Vladimir Serbinenko * commands/loadenv.c (check_blocklists): Fix off-by-one error. diff --git a/util/grub-probe.c b/util/grub-probe.c index 1710ec51b..3c54408c3 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -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. */