From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu
Date: Thu, 28 Nov 2013 15:08:53 +0100 [thread overview]
Message-ID: <52974E75.2060003@gmail.com> (raw)
In-Reply-To: <20131128110428.GA9590@riva.ucam.org>
[-- Attachment #1: Type: text/plain, Size: 2764 bytes --]
On 28.11.2013 12:04, Colin Watson wrote:
> On Thu, Nov 28, 2013 at 07:19:46AM +0100, Vladimir 'phcoder' Serbinenko wrote:
>> On Nov 28, 2013 3:31 AM, "Colin Watson" <cjwatson@ubuntu.com> 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.
>
Normal button: normal start, hidden menu
Second button: diagnostic, show 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?
>
if both GRUB_HIDDEN_TIMEOUT and GRUB_TIMEOUT are set the part for old
GRUB will replicate old behaviour while part for new GRUB would make
only one timeout. To make them align it would need set timeout=-1 at
last line.
> Thanks,
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
next prev parent reply other threads:[~2013-11-28 14:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 13:18 [RFC][PATCH] Allow hotkeys to interrupt hidden menu Colin Watson
2013-09-11 13:31 ` Colin Watson
2013-09-12 2:40 ` Andrey Borzenkov
2013-09-13 9:18 ` Franz Hsieh
2013-09-19 6:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-02 8:03 ` Franz Hsieh
2013-10-02 8:50 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-14 6:02 ` Franz Hsieh
2013-10-21 6:45 ` Franz Hsieh
2013-11-04 3:10 ` Yang Bai
2013-11-27 23:40 ` Colin Watson
2013-11-28 2:30 ` Colin Watson
2013-11-28 6:19 ` Vladimir 'phcoder' Serbinenko
2013-11-28 11:04 ` Colin Watson
2013-11-28 14:08 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-11-29 16:18 ` Colin Watson
2013-11-29 16:56 ` Andrey Borzenkov
2013-11-29 17:20 ` Colin Watson
2013-11-29 17:29 ` [PATCH] document sleep command exit codes Andrey Borzenkov
2013-11-30 10:39 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-28 17:20 ` [RFC][PATCH] Allow hotkeys to interrupt hidden menu Andrey Borzenkov
2013-11-28 18:05 ` Colin Watson
2013-11-29 6:17 ` Andrey Borzenkov
2013-11-29 15:26 ` Colin Watson
2013-11-28 17:22 ` Andrey Borzenkov
2013-11-28 18:06 ` Colin Watson
2013-11-29 6:21 ` Andrey Borzenkov
2013-09-12 2:44 ` Andrey Borzenkov
2013-09-12 13:17 ` Colin Watson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52974E75.2060003@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).