diff options
| author | Gary Ching-Pang Lin <glin@suse.com> | 2013-01-03 12:20:30 +0800 |
|---|---|---|
| committer | Gary Ching-Pang Lin <glin@suse.com> | 2013-01-03 12:20:30 +0800 |
| commit | 4a88de5816a7ac416d30dbd66e5117f5d4c2c74d (patch) | |
| tree | af07acb08b036699084c550be0de6da72453c41c /MokManager.c | |
| parent | 92a136d823e211b60656872ee43ade8693057ee1 (diff) | |
| download | efi-boot-shim-4a88de5816a7ac416d30dbd66e5117f5d4c2c74d.tar.gz efi-boot-shim-4a88de5816a7ac416d30dbd66e5117f5d4c2c74d.zip | |
Make sure the menu shows when the callback fails
Since Pause() doesn't clear the key from the input queue, the next
ReadKeyStroke reads the queued key instead of the new one. If the
user presses "Enter", MokManager exits directly without showing
the menu again.
Diffstat (limited to 'MokManager.c')
| -rw-r--r-- | MokManager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/MokManager.c b/MokManager.c index bfcbfd67..97588cb6 100644 --- a/MokManager.c +++ b/MokManager.c @@ -1241,6 +1241,9 @@ static void run_menu (CHAR16 *header, UINTN lines, struct menu_item *items, if (ret < 0) { Print(L"Press a key to continue\n"); Pause(); + /* Clear the key in the queue */ + uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2, + ST->ConIn, &key); } draw_menu (header, lines, items, count); pos = 0; |
