From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
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 [thread overview]
Message-ID: <20090902014523.GL13423@riva.ucam.org> (raw)
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 <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.
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]
next reply other threads:[~2009-09-02 1:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 1:45 Colin Watson [this message]
2009-09-03 14:19 ` Fix 'grub-probe -t fs' to do the comparison test it's meant to do Robert Millan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090902014523.GL13423@riva.ucam.org \
--to=cjwatson@ubuntu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.