From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JOISd-0007D3-UL for mharc-grub-devel@gnu.org; Sun, 10 Feb 2008 15:07:35 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOISb-0007CV-5Q for grub-devel@gnu.org; Sun, 10 Feb 2008 15:07:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOISZ-0007Bd-7t for grub-devel@gnu.org; Sun, 10 Feb 2008 15:07:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOISZ-0007BT-1U for grub-devel@gnu.org; Sun, 10 Feb 2008 15:07:31 -0500 Received: from ns39764.ovh.net ([91.121.25.85] helo=nexedi.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JOISY-000465-Sk for grub-devel@gnu.org; Sun, 10 Feb 2008 15:07:31 -0500 Received: from [10.8.0.46] (unknown [10.8.0.46]) by nexedi.com (Postfix) with ESMTP id CAD623EB24 for ; Sun, 10 Feb 2008 21:14:45 +0100 (CET) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 10 Feb 2008 21:07:27 +0100 User-Agent: KMail/1.9.4 References: <20080208161855.GA19377@thorin> <200802100810.13574.okuji@enbug.org> <20080210125533.GF1828@thorin> In-Reply-To: <20080210125533.GF1828@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802102107.27787.okuji@enbug.org> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] if timeout is set to zero, don't bother drawing the menu 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: Sun, 10 Feb 2008 20:07:34 -0000 On Sunday 10 February 2008 13:55, Robert Millan wrote: > We could make the behaviour be, that if ESC is pressed at any time before > an input line is completed, the operation is aborted, read returns > non-zero, and it doesn't save the line to any variable. What do you think? Not bad. :) > > In GRUB Legacy, the hidden menu uses ESC, because if it uses ENTER, and > > the user pushes ENTER too long, and a key repeat occurs, then the first > > item may be selected quick as a flash. But we could avoid this problem by > > vacuuming all inputs before showing a menu, so it might be acceptable to > > use ENTER instead. > > This is still error-prone. Even if you vacuum the input buffer, we still > have a race between user unholding ENTER and GRUB showing the menu. > Vacuuming the buffer just gives us more time, but doesn't garantee good > results. Sure, but I think it would be good enough in reality. > > (Actually, this should be implemented, regardless of this issue, because > > some BIOSes may leave garbage in a key buffer. I don't remember if this > > has been done for GRUB 2.) > > You mean garbage is present when control is transfered to GRUB, or > generated afterwards? I assume the first, but then if any user input is > attempted before removing the garbage, it may be corrupted. So it should > be done as early as possible, shouldn't it? Perhaps in > grub_console_init()? Maybe. Personally, I don't mind even if it is done at the startup. Okuji