From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Idkm6-0005UQ-87 for mharc-grub-devel@gnu.org; Fri, 05 Oct 2007 06:51:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Idkm3-0005R1-29 for grub-devel@gnu.org; Fri, 05 Oct 2007 06:51:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Idkm0-0005Oo-Dj for grub-devel@gnu.org; Fri, 05 Oct 2007 06:51:13 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Idkm0-0005OM-19 for grub-devel@gnu.org; Fri, 05 Oct 2007 06:51:12 -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 1Idklz-0007NQ-JX for grub-devel@gnu.org; Fri, 05 Oct 2007 06:51:11 -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 1Idkly-0005Gy-AK for grub-devel@gnu.org; Fri, 05 Oct 2007 12:51:10 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1Idkld-0007n0-Tb for grub-devel@gnu.org; Fri, 05 Oct 2007 12:50:49 +0200 Date: Fri, 5 Oct 2007 12:50:49 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20071005105049.GA29900@thorin> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline 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: Genre and OS details not recognized. Subject: [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: Fri, 05 Oct 2007 10:51:16 -0000 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 /.) --opJtzjQTFsWo+cga Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="util_info.diff" 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); } } --opJtzjQTFsWo+cga--