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, 19 Sep 2013 08:28:27 +0200 [thread overview]
Message-ID: <523A998B.9090104@gmail.com> (raw)
In-Reply-To: <CACtxs8r+hzwrBS9Oe8a7V+J83sroz3KhX7A9D_NZ30HsUP7cWA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2201 bytes --]
On 13.09.2013 11:18, Franz Hsieh wrote:
>
>
>
> On Wed, Sep 11, 2013 at 9:31 PM, Colin Watson <cjwatson@ubuntu.com
> <mailto:cjwatson@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 called
> or declared with no space before the opening parenthesis. That is,
> "function()" should become "function ()". I know it's a minor point,
> but it makes code much easier to read when it's all in the same style.
>
> On Wed, Sep 11, 2013 at 02:18:04PM +0100, Franz Hsieh (via Colin Watson)
> wrote:
> > +static struct
> > +{
> > + char *name;
> > + int key;
> > +} function_key_aliases[] =
> > + {
> > + {"f1", GRUB_TERM_KEY_F1},
> > + {"f2", GRUB_TERM_KEY_F2},
> > + {"f3", GRUB_TERM_KEY_F3},
> > + {"f4", GRUB_TERM_KEY_F4},
> > + {"f5", GRUB_TERM_KEY_F5},
> > + {"f6", GRUB_TERM_KEY_F6},
> > + {"f7", GRUB_TERM_KEY_F7},
> > + {"f8", GRUB_TERM_KEY_F8},
> > + {"f9", GRUB_TERM_KEY_F9},
> > + {"f10", GRUB_TERM_KEY_F10},
> > + {"f11", GRUB_TERM_KEY_F11},
> > + {"f12", GRUB_TERM_KEY_F12},
> > + };
> > +
>
> This is essentially a copy of hotkey_aliases from
> grub-core/commands/menuentry.c, and there's duplicated lookup code as
> well. Can you find any way to share it? Since we certainly don't want
> to put this in the kernel, and neither the sleep module nor the normal
> module really ought to depend on the other, I suspect that doing so
> would require a new module for shared menu code, which may well be
> overkill for this, but it's worth a look.
>
>
> I also agree to remove duplicate code, but seems not easy to do it unless
> we have a shared module, right? Well it would take me some time to evaluate.
Why not just allow any key interrupt sleep and if it's not escape using
ungetc-like code (with real ungetc code or global variable of some kind)?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
next prev parent reply other threads:[~2013-09-19 6:28 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 [this message]
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
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=523A998B.9090104@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).