mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-06-13 15:22:00 +00:00
Pause on callback failures
If a callback returns any kind of failure, wait for a keypress in order to give the user an opportunity to read any failure messages.
This commit is contained in:
parent
7127b1abc9
commit
310ec753fa
10
MokManager.c
10
MokManager.c
@ -819,6 +819,7 @@ static void run_menu (CHAR16 *header, UINTN lines, struct menu_item *items,
|
|||||||
UINTN index, pos = 0, wait = 0, offset;
|
UINTN index, pos = 0, wait = 0, offset;
|
||||||
EFI_INPUT_KEY key;
|
EFI_INPUT_KEY key;
|
||||||
EFI_STATUS status;
|
EFI_STATUS status;
|
||||||
|
INTN ret;
|
||||||
|
|
||||||
if (timeout)
|
if (timeout)
|
||||||
wait = 10000000;
|
wait = 10000000;
|
||||||
@ -885,8 +886,13 @@ static void run_menu (CHAR16 *header, UINTN lines, struct menu_item *items,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
items[pos].callback(items[pos].data, items[pos].data2,
|
ret = items[pos].callback(items[pos].data,
|
||||||
items[pos].data3);
|
items[pos].data2,
|
||||||
|
items[pos].data3);
|
||||||
|
if (ret < 0) {
|
||||||
|
Print(L"Press a key to continue\n");
|
||||||
|
Pause();
|
||||||
|
}
|
||||||
draw_menu (header, lines, items, count);
|
draw_menu (header, lines, items, count);
|
||||||
pos = 0;
|
pos = 0;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user