From d79e9ed5cacc1947225586e7a2624105e85fce90 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 28 Jul 2013 04:06:03 +0200 Subject: stop dump with ESC key; limit option editor to configured entries --- src/efi/gummiboot.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/efi/gummiboot.c b/src/efi/gummiboot.c index b0473b4..c4d22f3 100644 --- a/src/efi/gummiboot.c +++ b/src/efi/gummiboot.c @@ -594,6 +594,8 @@ 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); @@ -943,6 +945,9 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load status = StrDuplicate(L"Menu disabled. Hold down key at bootup to show menu."); break; case 'e': + /* only the options of configured entries can be edited */ + if (config->entries[idx_highlight]->type == LOADER_UNDEFINED) + break; uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, EFI_LIGHTGRAY|EFI_BACKGROUND_BLACK); uefi_call_wrapper(ST->ConOut->SetCursorPosition, 3, ST->ConOut, 0, y_max-1); uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, clearline+1); -- cgit v1.2.3