summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-07-28 04:06:03 +0200
committerKay Sievers <kay@vrfy.org>2013-07-28 04:06:03 +0200
commitd79e9ed5cacc1947225586e7a2624105e85fce90 (patch)
treeb26f76514e6c579d77aab83cae462890a32e9795
parent27df2b2e6a299eb0219c9fe689c23cdc1a7353a5 (diff)
stop dump with ESC key; limit option editor to configured entries
-rw-r--r--src/efi/gummiboot.c5
1 files changed, 5 insertions, 0 deletions
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);