]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handling
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Mon, 12 Sep 2022 08:33:52 +0000 (17:33 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 14 Sep 2022 06:43:31 +0000 (08:43 +0200)
This is preparation to support menu-driven UEFI BootOrder
variable updated by KEY_PLUS, KEY_MINUS and KEY_SPACE.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
common/menu.c
include/menu.h

index 3e876b55b34a49c83f2f379d3c9f612bdd7c1fdd..0d19601cf538c1d9d049afb780374d3ea21ffe2b 100644 (file)
@@ -548,4 +548,13 @@ void bootmenu_loop(struct bootmenu_data *menu,
        /* ^C was pressed */
        if (c == 0x3)
                *key = KEY_QUIT;
+
+       if (c == '+')
+               *key = KEY_PLUS;
+
+       if (c == '-')
+               *key = KEY_MINUS;
+
+       if (c == ' ')
+               *key = KEY_SPACE;
 }
index e74616cae87a607a5ea667017d5e04d4df2bd02a..702aacb170c64a219f645be86eaee8b0fe320694 100644 (file)
@@ -48,6 +48,9 @@ enum bootmenu_key {
        KEY_DOWN,
        KEY_SELECT,
        KEY_QUIT,
+       KEY_PLUS,
+       KEY_MINUS,
+       KEY_SPACE,
 };
 
 void bootmenu_autoboot_loop(struct bootmenu_data *menu,