From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KZOsp-0000jI-Jf for mharc-grub-devel@gnu.org; Sat, 30 Aug 2008 07:44:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZOsn-0000ih-5L for grub-devel@gnu.org; Sat, 30 Aug 2008 07:44:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZOsl-0000iK-HK for grub-devel@gnu.org; Sat, 30 Aug 2008 07:44:43 -0400 Received: from [199.232.76.173] (port=35358 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZOsl-0000iE-Cp for grub-devel@gnu.org; Sat, 30 Aug 2008 07:44:43 -0400 Received: from aybabtu.com ([69.60.117.155]:54083) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KZOsk-0002EO-SZ for grub-devel@gnu.org; Sat, 30 Aug 2008 07:44:43 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KZOiu-0006rg-Ue for grub-devel@gnu.org; Sat, 30 Aug 2008 13:34:33 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KZOrL-0001Cu-8u for grub-devel@gnu.org; Sat, 30 Aug 2008 13:43:15 +0200 Date: Sat, 30 Aug 2008 13:43:15 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080830114315.GC16775@thorin> References: <20080823144313.GA24757@pina.cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080823144313.GA24757@pina.cat> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird 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] Warning if grub.cfg not found 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: Sat, 30 Aug 2008 11:44:45 -0000 Hi On Sat, Aug 23, 2008 at 04:43:14PM +0200, Carles Pina i Estany wrote: > Index: normal/cmdline.c > =================================================================== > --- normal/cmdline.c (revision 1826) > +++ normal/cmdline.c (working copy) > @@ -137,12 +137,17 @@ grub_cmdline_run (int nested) > { > grub_normal_init_page (); > grub_setcursor (1); > + > + if ( nested == -1 ) nested was intended to be a "boolean"; this changes its meaning, so the name becomes confusing. I think there's no need to reuse the variable in this part of GRUB, and it'd be fine to add a new one IMO. However ... > + grub_printf ("\n\ > + WARNING: GNU GRUB couldn't open /boot/grub/grub.cfg\n\ > + Falling back to GNU GRUB Command Line\n\n"); ... this looks like something that belongs whereever the decision to fall back is taken. Then once the problem is handled there, you don't need to tell the lower layer whether to print a message or not. Also, I think there are two separate cases: - grub.cfg is there but can't be opened (we need to tell the user about _why_ via grub_print_error()). - grub.cfg is simply not there (perhaps the user intended that). and the messages should be somewhat different for each one. -- 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."