[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] flush stderr in grub_util_info
From: |
Robert Millan |
Subject: |
Re: [PATCH] flush stderr in grub_util_info |
Date: |
Mon, 22 Oct 2007 22:05:56 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Committed.
On Fri, Oct 05, 2007 at 12:50:49PM +0200, Robert Millan wrote:
>
> I run into this when debugging a problem with grub-probe silently hanging
> when opening /dev/fd0. Turns out that because of stderr buffering I didn't
> get to see the output at all. I think grub_util_info should flush it since
> it can be critical information to find a problem (in my case, a bogus /dev/fd0
> entry in device.map).
>
> See attached patch.
>
> --
> Robert Millan
>
> <GPLv2> I know my rights; I want my phone call!
> <DRM> What use is a phone call, if you are unable to speak?
> (as seen on /.)
> 2007-10-05 Robert Millan <address@hidden>
>
> * util/misc.c (grub_util_info): flush stderr before returning.
>
> diff -ur grub2/util/misc.c grub2.probe/util/misc.c
> --- grub2/util/misc.c 2007-07-22 01:32:31.000000000 +0200
> +++ grub2.probe/util/misc.c 2007-10-05 12:46:14.000000000 +0200
> @@ -53,6 +53,7 @@
> vfprintf (stderr, fmt, ap);
> va_end (ap);
> fputc ('\n', stderr);
> + fflush (stderr);
> }
> }
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)