diff mbox series

[v5,03/17] menu: always show the menu regardless of the number of entry

Message ID 20220428080950.23509-4-masahisa.kojima@linaro.org
State New
Headers show
Series enable menu-driven boot device selection | expand

Commit Message

Masahisa Kojima April 28, 2022, 8:09 a.m. UTC
To make user aware of the menu entry selection, menu always
appears regardless of the number of entry.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
No changes since v4

Newly created in v4

 common/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heinrich Schuchardt May 1, 2022, 3:37 p.m. UTC | #1
On 4/28/22 10:09, Masahisa Kojima wrote:
> To make user aware of the menu entry selection, menu always
> appears regardless of the number of entry.
>
> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
> No changes since v4
>
> Newly created in v4
>
>   common/menu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/menu.c b/common/menu.c
> index 5fb2ffbd06..b577d80b4f 100644
> --- a/common/menu.c
> +++ b/common/menu.c
> @@ -271,7 +271,7 @@ int menu_get_choice(struct menu *m, void **choice)
>   	if (!m || !choice)
>   		return -EINVAL;
>
> -	if (!m->prompt || m->item_cnt == 1)
> +	if (!m->prompt)
>   		return menu_default_choice(m, choice);
>
>   	return menu_interactive_choice(m, choice);
diff mbox series

Patch

diff --git a/common/menu.c b/common/menu.c
index 5fb2ffbd06..b577d80b4f 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -271,7 +271,7 @@  int menu_get_choice(struct menu *m, void **choice)
 	if (!m || !choice)
 		return -EINVAL;
 
-	if (!m->prompt || m->item_cnt == 1)
+	if (!m->prompt)
 		return menu_default_choice(m, choice);
 
 	return menu_interactive_choice(m, choice);