return enter;
}
-static VOID dump_status(Config *config) {
+static VOID dump_status(Config *config, CHAR16 *loaded_image_path) {
UINTN index;
INTN i;
CHAR16 *s;
uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
Print(L"gummiboot version: %d\n", VERSION);
+ Print(L"loaded image: %s\n", loaded_image_path);
Print(L"UEFI version: %d.%02d\n", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff);
Print(L"firmware vendor: %s\n", ST->FirmwareVendor);
Print(L"firmware version: %d.%02d\n", ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff);
return uefi_call_wrapper(ConsoleControl->SetMode, 2, ConsoleControl, EfiConsoleControlScreenText);
}
-static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry) {
+static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *loaded_image_path) {
EFI_STATUS err;
INTN visible_max;
INTN idx_highlight;
ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff);
break;
case '*':
- dump_status(config);
+ dump_status(config, loaded_image_path);
refresh = TRUE;
break;
}
entry->loader = stra_to_path(value);
/* do not add an entry for ourselves */
- if (StrCmp(entry->loader, loaded_image_path) == 0) {
+ if (StriCmp(entry->loader, loaded_image_path) == 0) {
entry->type = LOADER_UNDEFINED;
break;
}
ConfigEntry *entry;
/* do not add an entry for ourselves */
- if (StrCmp(loader, loaded_image_path) == 0)
+ if (StriCmp(loader, loaded_image_path) == 0)
return;
/* check existence */
L"builtin-shellx64", L"EFI Shell", L"\\shellx64.efi");
config_entry_add_loader(&config, root_dir, loaded_image_path,
L"builtin-bootx64", L"EFI Default Loader", L"\\EFI\\BOOT\\BOOTX64.EFI");
- FreePool(loaded_image_path);
config_title_generate(&config);
entry = config.entries[config.idx_default];
if (menu) {
efivar_set_ticks(L"LoaderTicksStartMenu", 0);
- if (!menu_run(&config, &entry))
+ if (!menu_run(&config, &entry, loaded_image_path))
break;
}
config.timeout_sec = 0;
}
out:
+ FreePool(loaded_image_path);
config_free(&config);
uefi_call_wrapper(root_dir->Close, 1, root_dir);
uefi_call_wrapper(BS->CloseProtocol, 4, image, &LoadedImageProtocol, image, NULL);