[RESEND v9 4/9] menu: add KEY_PLUS and KEY_MINUS handling

Ilias Apalodimas ilias.apalodimas at linaro.org
Mon Jul 18 14:39:37 CEST 2022


On Fri, 15 Jul 2022 at 17:45, Masahisa Kojima
<masahisa.kojima at linaro.org> wrote:
>
> This is preparation to support menu-driven UEFI BootOrder
> variable updated by KEY_PLUS and KEY_MINUS.
>
> Signed-off-by: Masahisa Kojima <masahisa.kojima at linaro.org>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> No change since v7
>
> Newly created in v7
>
>  common/menu.c  | 6 ++++++
>  include/menu.h | 2 ++
>  2 files changed, 8 insertions(+)
>
> diff --git a/common/menu.c b/common/menu.c
> index 3e876b55b3..3470f95a98 100644
> --- a/common/menu.c
> +++ b/common/menu.c
> @@ -548,4 +548,10 @@ 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;
>  }
> diff --git a/include/menu.h b/include/menu.h
> index e74616cae8..4c32e74ce9 100644
> --- a/include/menu.h
> +++ b/include/menu.h
> @@ -48,6 +48,8 @@ enum bootmenu_key {
>         KEY_DOWN,
>         KEY_SELECT,
>         KEY_QUIT,
> +       KEY_PLUS,
> +       KEY_MINUS,
>  };
>
>  void bootmenu_autoboot_loop(struct bootmenu_data *menu,
> --
> 2.17.1
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>


More information about the U-Boot mailing list