All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix 'grub-probe -t fs' to do the comparison test it's meant to do
@ 2009-09-02  1:45 Colin Watson
  2009-09-03 14:19 ` Robert Millan
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Watson @ 2009-09-02  1:45 UTC (permalink / raw)
  To: grub-devel

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]



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix 'grub-probe -t fs' to do the comparison test it's meant to do
  2009-09-02  1:45 Fix 'grub-probe -t fs' to do the comparison test it's meant to do Colin Watson
@ 2009-09-03 14:19 ` Robert Millan
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Millan @ 2009-09-03 14:19 UTC (permalink / raw)
  To: The development of GRUB 2

On Wed, Sep 02, 2009 at 02:45:24AM +0100, Colin Watson wrote:
> 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.)

It's fine, thanks.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-03 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-02  1:45 Fix 'grub-probe -t fs' to do the comparison test it's meant to do Colin Watson
2009-09-03 14:19 ` Robert Millan

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.