[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu
From: |
Andrey Borzenkov |
Subject: |
Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu |
Date: |
Thu, 12 Sep 2013 06:44:19 +0400 |
В Wed, 11 Sep 2013 14:18:04 +0100
Colin Watson <address@hidden> пишет:
>
> +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);
> +
> + /* If the value is invalid, unset the variable. */
Why only if invalid? This is one time event which should be reset as
soon as it is consumed.
Actually I'm not sure if user visible environment variable is needed at
all - just make it a global variable in normal.mod.