diff options
| author | Matthew Garrett <mjg@redhat.com> | 2012-10-18 17:43:53 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2012-10-18 17:43:53 -0400 |
| commit | d08ea5363cec6f0159112aec1658d57fbaf1e471 (patch) | |
| tree | e7194bffb165c9ba6e83a6b51f5a1b1da9fe6d45 /MokManager.c | |
| parent | 9eaadb0d115eaf452f105398b300194939164664 (diff) | |
| download | efi-boot-shim-d08ea5363cec6f0159112aec1658d57fbaf1e471.tar.gz efi-boot-shim-d08ea5363cec6f0159112aec1658d57fbaf1e471.zip | |
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.
Diffstat (limited to 'MokManager.c')
| -rw-r--r-- | MokManager.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/MokManager.c b/MokManager.c index fb203526..88a08f72 100644 --- a/MokManager.c +++ b/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; EFI_INPUT_KEY key; EFI_STATUS status; + INTN ret; if (timeout) wait = 10000000; @@ -885,8 +886,13 @@ static void run_menu (CHAR16 *header, UINTN lines, struct menu_item *items, return; } - items[pos].callback(items[pos].data, items[pos].data2, - items[pos].data3); + ret = items[pos].callback(items[pos].data, + items[pos].data2, + items[pos].data3); + if (ret < 0) { + Print(L"Press a key to continue\n"); + Pause(); + } draw_menu (header, lines, items, count); pos = 0; break; |
