diff options
| author | Masahisa Kojima <[email protected]> | 2022-03-24 22:54:33 +0900 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2022-04-23 22:05:34 +0200 |
| commit | 990f6636eae1718b785a39c300f466fd41985c55 (patch) | |
| tree | 02c7fe5b9bad4ed1ae15d27ace8ae7a032892478 /cmd | |
| parent | 3fb6fa7a716309566e5e8a447e06411125e3308a (diff) | |
bootmenu: fix menu API error handling
U-Boot menu framework(common/menu.c) returns 1 if it is successful,
returns negative value if it fails.
Signed-off-by: Masahisa Kojima <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/bootmenu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 409ef9a8480..d5734872720 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -463,7 +463,7 @@ static void bootmenu_show(int delay) } for (iter = bootmenu->first; iter; iter = iter->next) { - if (!menu_item_add(menu, iter->key, iter)) + if (menu_item_add(menu, iter->key, iter) != 1) goto cleanup; } @@ -476,7 +476,7 @@ static void bootmenu_show(int delay) init = 1; - if (menu_get_choice(menu, &choice)) { + if (menu_get_choice(menu, &choice) == 1) { iter = choice; title = strdup(iter->title); command = strdup(iter->command); |
