From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vm0I0-0007Vb-Jw for mharc-grub-devel@gnu.org; Thu, 28 Nov 2013 07:01:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vm0Hw-0007Td-Rf for grub-devel@gnu.org; Thu, 28 Nov 2013 07:01:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vm0Hv-0001cU-JE for grub-devel@gnu.org; Thu, 28 Nov 2013 07:01:44 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:43820 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vm0Hv-0001cO-DD for grub-devel@gnu.org; Thu, 28 Nov 2013 07:01:43 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1Vm0Hu-0008MF-B3 for grub-devel@gnu.org; Thu, 28 Nov 2013 12:01:42 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1VlzOY-0002XK-7h for grub-devel@gnu.org; Thu, 28 Nov 2013 11:04:30 +0000 Date: Thu, 28 Nov 2013 11:04:28 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu Message-ID: <20131128110428.GA9590@riva.ucam.org> References: <20130911131804.GA10979@riva.ucam.org> <20130911133129.GB10979@riva.ucam.org> <20131127234057.GA23139@riva.ucam.org> <20131128023056.GA19545@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 12:01:46 -0000 On Thu, Nov 28, 2013 at 07:19:46AM +0100, Vladimir 'phcoder' Serbinenko wrote: > On Nov 28, 2013 3:31 AM, "Colin Watson" wrote: > > +If this option is set to @samp{countdown} or @samp{hidden}, then, before > > +displaying the menu, GRUB will wait for the timeout set by > > +@samp{GRUB_TIMEOUT} to expire. If @key{ESC} is pressed during that > > time, it > > +will display the menu and wait for input according to > > @samp{GRUB_TIMEOUT}. > > +If a hotkey associated with a menu entry is pressed, it will boot the > > +associated menu entry immediately. If the timeout expires before either > > of > > +these happens, it will display the menu. > > What you describe here doesn‘t serm what code is doing. Copypaste error? I must be missing something. What part of this doesn't agree with the code? ... oh, right, if the timeout expires then it will boot the default entry. I'll fix that, thanks. > > diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in > > index ba1d4ef..50f73aa 100644 > > --- a/util/grub-mkconfig.in > > +++ b/util/grub-mkconfig.in > > @@ -186,6 +186,7 @@ export GRUB_DEFAULT \ > > GRUB_HIDDEN_TIMEOUT \ > > GRUB_HIDDEN_TIMEOUT_QUIET \ > > GRUB_TIMEOUT \ > > + GRUB_TIMEOUT_STYLE \ > > you need button variant as well Can you suggest a use case for that? I can understand why you might want different timeouts in the button case, just about, but not why you'd want an entirely different style of menu. > > + fi > > if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then > > verbose= > > + style="hidden" > > else > > verbose=" --verbose" > > + style="countdown" > > fi > > cat << EOF > > -if sleep$verbose --interruptible ${1} ; then > > +if [ x\$feature_timeout_style = xy ] ; then > > + set timeout_style=$style > > + set timeout=${1} > > +elif sleep$verbose --interruptible ${1} ; then > > set timeout=${2} > > Is behaviour mismatch between both versions intentional? > I see 2 ways of handling double timeout: either not supporting at all > anymore or generate old code for it. This one seems to be mix of both The code is somewhat inevitably confusing, I'll agree, but I don't see the mismatch. Could you please give me an example? Thanks, -- Colin Watson [cjwatson@ubuntu.com]