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>
This commit is contained in:
Simon Glass
2023-01-06 08:52:24 -06:00
committed by Tom Rini
parent 5712976b26
commit d0ca98dbd9
4 changed files with 24 additions and 23 deletions

View File

@@ -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: