Only print boot order / boot current if we can get the variables from
the loader. Some UEFI implementations don't return all of them. Sponsored by: Netflix
This commit is contained in:
parent
bf22ec69ef
commit
1ce0264e67
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331067
@ -467,16 +467,18 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab)
|
|||||||
|
|
||||||
boot_current = 0;
|
boot_current = 0;
|
||||||
sz = sizeof(boot_current);
|
sz = sizeof(boot_current);
|
||||||
efi_global_getenv("BootCurrent", &boot_current, &sz);
|
if (efi_global_getenv("BootCurrent", &boot_current, &sz) == EFI_SUCCESS) {
|
||||||
printf(" BootCurrent: %04x\n", boot_current);
|
printf(" BootCurrent: %04x\n", boot_current);
|
||||||
|
|
||||||
sz = sizeof(boot_order);
|
sz = sizeof(boot_order);
|
||||||
efi_global_getenv("BootOrder", &boot_order, &sz);
|
if (efi_global_getenv("BootOrder", &boot_order, &sz) == EFI_SUCCESS) {
|
||||||
printf(" BootOrder:");
|
printf(" BootOrder:");
|
||||||
for (i = 0; i < sz / sizeof(boot_order[0]); i++)
|
for (i = 0; i < sz / sizeof(boot_order[0]); i++)
|
||||||
printf(" %04x%s", boot_order[i],
|
printf(" %04x%s", boot_order[i],
|
||||||
boot_order[i] == boot_current ? "[*]" : "");
|
boot_order[i] == boot_current ? "[*]" : "");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef TEST_FAILURE
|
#ifdef TEST_FAILURE
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user