From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ik3XM-0007xI-2F for mharc-grub-devel@gnu.org; Mon, 22 Oct 2007 16:06:08 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ik3XK-0007vY-Gp for grub-devel@gnu.org; Mon, 22 Oct 2007 16:06:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ik3XI-0007se-Me for grub-devel@gnu.org; Mon, 22 Oct 2007 16:06:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ik3XI-0007sP-HX for grub-devel@gnu.org; Mon, 22 Oct 2007 16:06:04 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ik3XI-0003HE-3r for grub-devel@gnu.org; Mon, 22 Oct 2007 16:06:04 -0400 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Ik3XG-0003wm-Kq for grub-devel@gnu.org; Mon, 22 Oct 2007 22:06:03 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1Ik3XA-00033K-G7 for grub-devel@gnu.org; Mon, 22 Oct 2007 22:05:56 +0200 Date: Mon, 22 Oct 2007 22:05:56 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20071022200556.GC31128@thorin> References: <20071005105049.GA29900@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071005105049.GA29900@thorin> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] flush stderr in grub_util_info X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2007 20:06:06 -0000 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 > > I know my rights; I want my phone call! > What use is a phone call, if you are unable to speak? > (as seen on /.) > 2007-10-05 Robert Millan > > * 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 > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- Robert Millan I know my rights; I want my phone call! What use is a phone call, if you are unable to speak? (as seen on /.)