Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MjDjP-0000D2-FT for mharc-grub-devel@gnu.org; Thu, 03 Sep 2009 10:56:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjDjN-0000AV-NP for grub-devel@gnu.org; Thu, 03 Sep 2009 10:56:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjDjJ-0008W5-SZ for grub-devel@gnu.org; Thu, 03 Sep 2009 10:56:09 -0400 Received: from [199.232.76.173] (port=58245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjDjJ-0008Vf-I8 for grub-devel@gnu.org; Thu, 03 Sep 2009 10:56:05 -0400 Received: from xvm-190-8.ghst.net ([217.70.190.8]:53112 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MjDjI-0003Ut-NE for grub-devel@gnu.org; Thu, 03 Sep 2009 10:56:05 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MjDjG-0005Ap-69 for grub-devel@gnu.org; Thu, 03 Sep 2009 16:56:02 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MjDjF-0004gz-Jw for grub-devel@gnu.org; Thu, 03 Sep 2009 16:56:01 +0200 Date: Thu, 3 Sep 2009 16:56:01 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090903145601.GK6656@thorin> References: <20090903140047.GW13423@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090903140047.GW13423@riva.ucam.org> 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.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Quieten normal mode startup unless a prompt is going to be displayed 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: Thu, 03 Sep 2009 14:56:10 -0000 On Thu, Sep 03, 2009 at 03:00:48PM +0100, Colin Watson wrote: > Index: normal/main.c > =================================================================== > --- normal/main.c (revision 2561) > +++ normal/main.c (working copy) > @@ -503,7 +503,7 @@ > } > > static grub_err_t > -grub_normal_reader_init (void) > +grub_normal_display_intro (void) > { > grub_normal_init_page (); > grub_setcursor (1); > @@ -524,7 +524,14 @@ > { > grub_parser_t parser = grub_parser_get_current (); > char prompt[8 + grub_strlen (parser->name)]; > + static int displayed_intro; > > + if (! displayed_intro) > + { > + grub_normal_display_intro (); > + displayed_intro = 1; > + } > + > grub_sprintf (prompt, "%s:%s> ", parser->name, (cont) ? "" : "grub"); > > while (1) > @@ -547,7 +554,6 @@ > static struct grub_reader grub_normal_reader = > { > .name = "normal", > - .init = grub_normal_reader_init, > .read_line = grub_normal_read_line > }; grub_normal_read_line() seems like an odd place to handle this. It looks like a workaround for a bug we already had (about welcome message being printed twice). This was discussed in a thread with subject "regression in hiddenmenu" (last June). Later, Bean proposed a patch (see "[PATCH] hidemenu fix"). I would appreciate if you can have a look at both things. -- 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."