From 5b13642b90ca5f9438616a93ee9d770247732e3a Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 28 Jul 2013 16:05:05 +0200 Subject: [PATCH] dump: handle ESC key before printing the first entry --- src/efi/gummiboot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/efi/gummiboot.c b/src/efi/gummiboot.c index dc1ae97..4213b4e 100644 --- a/src/efi/gummiboot.c +++ b/src/efi/gummiboot.c @@ -563,6 +563,9 @@ static VOID dump_status(Config *config, CHAR16 *loaded_image_path) { for (i = 0; i < config->entry_count; i++) { ConfigEntry *entry; + if (key.ScanCode == SCAN_ESC) + break; + entry = config->entries[i]; Print(L"config entry: %d/%d\n", i+1, config->entry_count); if (entry->file) @@ -595,8 +598,6 @@ static VOID dump_status(Config *config, CHAR16 *loaded_image_path) { Print(L"\n--- press key ---\n\n"); uefi_call_wrapper(BS->WaitForEvent, 3, 1, &ST->ConIn->WaitForKey, &index); uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2, ST->ConIn, &key); - if (key.ScanCode == SCAN_ESC) - break; } uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); -- 2.7.4