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 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)?
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel