Improve error output when boot option fails to load

This commit is contained in:
Jeremy Soller
2019-10-03 13:19:24 -06:00
committed by Tim Crawford
parent 7050fc3a26
commit 52d5d1b2c5
4 changed files with 35 additions and 1 deletions

View File

@@ -203,6 +203,7 @@ CallBootManager (
CHAR16 *ExitData;
UINTN ExitDataSize;
EFI_STRING_ID Token;
UINTN Index;
EFI_INPUT_KEY Key;
CHAR16 *HelpString;
UINTN HelpSize;
@@ -390,10 +391,15 @@ CallBootManager (
} else {
gOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
PlatformBdsBootFail (gOption, Status, ExitData, ExitDataSize);
// Wait for key
gST->ConOut->OutputString (
gST->ConOut,
GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE))
);
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index);
ASSERT_EFI_ERROR (Status);
ASSERT (Index == 0);
while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {}
}
}