Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-29 Thread Colin Watson
On Fri, Nov 29, 2013 at 10:17:26AM +0400, Andrey Borzenkov wrote: В Thu, 28 Nov 2013 18:05:37 + Colin Watson cjwat...@ubuntu.com пишет: On Thu, Nov 28, 2013 at 09:20:17PM +0400, Andrey Borzenkov wrote: Not only. If you hit ESC it will not wait for input according to GRUB_TIMEOUT - it

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-29 Thread Colin Watson
On Thu, Nov 28, 2013 at 03:08:53PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: 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 cjwat...@ubuntu.com wrote: +

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-29 Thread Colin Watson
On Fri, Nov 29, 2013 at 08:56:03PM +0400, Andrey Borzenkov wrote: В Fri, 29 Nov 2013 16:18:45 + Colin Watson cjwat...@ubuntu.com пишет: +Some laptop vendors provide an additional power-on button which boots +another OS. GRUB supports such buttons with the @samp{GRUB_TIMEOUT_BUTTON},

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-28 Thread Colin Watson
On Thu, Nov 28, 2013 at 07:19:46AM +0100, Vladimir 'phcoder' Serbinenko wrote: On Nov 28, 2013 3:31 AM, Colin Watson cjwat...@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

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-28 Thread Vladimir 'φ-coder/phcoder' Serbinenko
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 cjwat...@ubuntu.com wrote: +If this option is set to @samp{countdown} or @samp{hidden}, then, before +displaying the menu, GRUB will

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-28 Thread Andrey Borzenkov
В Thu, 28 Nov 2013 02:30:56 + Colin Watson cjwat...@ubuntu.com пишет: @item GRUB_HIDDEN_TIMEOUT @item GRUB_HIDDEN_TIMEOUT_QUIET I suggest removing them from user visible documentation and leaving only as compatibility options in grub-mkconfig. No reason do endorse their usage (deprecated

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-28 Thread Colin Watson
On Thu, Nov 28, 2013 at 09:20:17PM +0400, Andrey Borzenkov wrote: Not only. If you hit ESC it will not wait for input according to GRUB_TIMEOUT - it will stop displaying menu. No, that's not true in my tests. If you hit Escape while a hidden timeout is active and GRUB_TIMEOUT is non-zero,

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-28 Thread Colin Watson
On Thu, Nov 28, 2013 at 09:22:49PM +0400, Andrey Borzenkov wrote: В Thu, 28 Nov 2013 02:30:56 + Colin Watson cjwat...@ubuntu.com пишет: @item GRUB_HIDDEN_TIMEOUT @item GRUB_HIDDEN_TIMEOUT_QUIET I suggest removing them from user visible documentation and leaving only as

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-28 Thread Andrey Borzenkov
В Thu, 28 Nov 2013 18:05:37 + Colin Watson cjwat...@ubuntu.com пишет: On Thu, Nov 28, 2013 at 09:20:17PM +0400, Andrey Borzenkov wrote: Not only. If you hit ESC it will not wait for input according to GRUB_TIMEOUT - it will stop displaying menu. No, that's not true in my tests. If

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-28 Thread Andrey Borzenkov
В Thu, 28 Nov 2013 18:06:44 + Colin Watson cjwat...@ubuntu.com пишет: On Thu, Nov 28, 2013 at 09:22:49PM +0400, Andrey Borzenkov wrote: В Thu, 28 Nov 2013 02:30:56 + Colin Watson cjwat...@ubuntu.com пишет: @item GRUB_HIDDEN_TIMEOUT @item GRUB_HIDDEN_TIMEOUT_QUIET I

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-27 Thread Colin Watson
On Mon, Oct 21, 2013 at 02:45:04PM +0800, Franz Hsieh wrote: I don't know if l lose any update from you. Would you give me comments about the latest hotkey patch? Vladimir and I talked about this on IRC today. We share a dislike for the hardcoded hotkey names. Between us, we came up with a

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-27 Thread Colin Watson
Following discussion with Vladimir on IRC, here's another attempt. The preferred user-facing configuration mechanism is now simpler, although some unfortunate compatibility code is required to make all this work. Revamp hidden timeout handling Add a new timeout_style environment variable and a

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-27 Thread Vladimir 'phcoder' Serbinenko
On Nov 28, 2013 3:31 AM, Colin Watson cjwat...@ubuntu.com wrote: Following discussion with Vladimir on IRC, here's another attempt. The preferred user-facing configuration mechanism is now simpler, although some unfortunate compatibility code is required to make all this work. Revamp hidden

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-11-03 Thread Yang Bai
Ping. Any updates? On Mon, Oct 21, 2013 at 2:45 PM, Franz Hsieh franz.hs...@canonical.com wrote: Hi Vladimir, I don't know if l lose any update from you. Would you give me comments about the latest hotkey patch? Summary of the patch: * allow function keys / delete / backspace to

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-10-21 Thread Franz Hsieh
Hi Vladimir, I don't know if l lose any update from you. Would you give me comments about the latest hotkey patch? Summary of the patch: * allow function keys / delete / backspace to interrupt sleep and set 'hotkey' variable. * remove key aliases structure. * using grub_xasprintf

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-10-14 Thread Franz Hsieh
On 02.10.2013 10:50, Vladimir 'φ-coder/phcoder' Serbinenko wrote: * Hi, there* * * * I had merged the patch for enabling hotkey in grub silent mode to* * grub-trunk.* * The --function-key now has been removed from sleep.mod, now sleep.mod will* * monitor all function keys, delete, tab and

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-10-02 Thread Franz Hsieh
Hi, there I had merged the patch for enabling hotkey in grub silent mode to grub-trunk. The --function-key now has been removed from sleep.mod, now sleep.mod will monitor all function keys, delete, tab and backspace. Thanks! Franz Hsieh On Fri, Sep 13, 2013 at 5:18 PM, Franz Hsieh

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-10-02 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 02.10.2013 10:03, Franz Hsieh wrote: Hi, there I had merged the patch for enabling hotkey in grub silent mode to grub-trunk. The --function-key now has been removed from sleep.mod, now sleep.mod will monitor all function keys, delete, tab and backspace. Have you missed on-going

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-09-19 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 13.09.2013 11:18, Franz Hsieh wrote: On Wed, Sep 11, 2013 at 9:31 PM, Colin Watson cjwat...@ubuntu.com mailto:cjwat...@ubuntu.com wrote: Hi Franz, Throughout this patch, please take care to adhere to the GRUB coding style. This is definitely an improvement over

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-09-13 Thread Franz Hsieh
On Wed, Sep 11, 2013 at 9:31 PM, Colin Watson cjwat...@ubuntu.com wrote: Hi Franz, Throughout this patch, please take care to adhere to the GRUB coding style. This is definitely an improvement over previous versions I've reviewed, but it still has a number of places where functions are

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-09-12 Thread Colin Watson
On Thu, Sep 12, 2013 at 06:44:19AM +0400, Andrey Borzenkov wrote: В Wed, 11 Sep 2013 14:18:04 +0100 +int +grub_menu_get_hotkey (void) +{ + char *val; + int hotkey; + + val = grub_env_get (hotkey); + if (! val) +return -1; + + grub_error_push(); + + hotkey =

[RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-09-11 Thread Colin Watson
One of my colleagues, Franz Hsieh (CCed) sent this patch to https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1178618. It has a few minor implementation issues, and I'll follow up with my own review in a few minutes (it certainly also requires rebasing to apply properly to trunk), but I wanted

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-09-11 Thread Colin Watson
Hi Franz, Throughout this patch, please take care to adhere to the GRUB coding style. This is definitely an improvement over previous versions I've reviewed, but it still has a number of places where functions are called or declared with no space before the opening parenthesis. That is,

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-09-11 Thread Andrey Borzenkov
В Wed, 11 Sep 2013 14:31:29 +0100 Colin Watson cjwat...@ubuntu.com пишет: Rather than having to configure this explicitly, I have an alternative suggestion, which ties into my earlier suggestion of making the hotkey code a bit more shared. Why not have sleep --interruptible look up the

Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu

2013-09-11 Thread Andrey Borzenkov
В Wed, 11 Sep 2013 14:18:04 +0100 Colin Watson cjwat...@ubuntu.com пишет: +int +grub_menu_get_hotkey (void) +{ + char *val; + int hotkey; + + val = grub_env_get (hotkey); + if (! val) +return -1; + + grub_error_push(); + + hotkey = (int) grub_strtoul (val, 0, 10); + +