diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-06 17:52:24 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-16 22:14:11 +0300 |
commit | d0ca98dbd99c2534c9e96e4c226e52ab80f2248f (patch) | |
tree | ec90d07fc24388bde0ffb63d35da3f0cc5c77061 /cmd | |
parent | 5712976b26f7865f348aba51c9fa367c456e1795 (diff) | |
download | u-boot-d0ca98dbd99c2534c9e96e4c226e52ab80f2248f.tar.xz |
menu: Update bootmenu_loop() to return the code
Use the return value to save having to pass around a pointer. This also
resolves any ambiguity about what *key contains when the function is
called.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootmenu.c | 2 | ||||
-rw-r--r-- | cmd/eficonfig.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 086d04148a..43553dbcc9 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -96,7 +96,7 @@ static char *bootmenu_choice_entry(void *data) key = bootmenu_autoboot_loop(menu, &esc); } else { /* Some key was pressed, so autoboot was stopped */ - bootmenu_loop(menu, &key, &esc); + key = bootmenu_loop(menu, &esc); } switch (key) { diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 8f246bc271..96cb1a367f 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -191,7 +191,7 @@ static char *eficonfig_choice_entry(void *data) struct efimenu *efi_menu = data; while (1) { - bootmenu_loop((struct bootmenu_data *)efi_menu, &key, &esc); + key = bootmenu_loop((struct bootmenu_data *)efi_menu, &esc); switch (key) { case BKEY_UP: @@ -1868,7 +1868,7 @@ static efi_status_t eficonfig_choice_change_boot_order(struct efimenu *efi_menu) struct eficonfig_entry *entry, *tmp; while (1) { - bootmenu_loop(NULL, &key, &esc); + key = bootmenu_loop(NULL, &esc); switch (key) { case BKEY_PLUS: |