MdeModulePkg/BM: Make it look like current BootMngr

This commit is contained in:
Tim Crawford
2020-02-03 14:29:03 -07:00
parent 0d209e3a81
commit 52d9ce76db
4 changed files with 20 additions and 31 deletions

View File

@ -493,6 +493,7 @@ UpdateBootManager (
BOOLEAN IsLegacyOption;
BOOLEAN NeedEndOp;
UINTN MaxLen;
UINTN OptionCount = 0;
DeviceType = (UINT16)-1;
@ -550,6 +551,8 @@ UpdateBootManager (
continue;
}
OptionCount++;
//
// Group the legacy boot option in the sub title created dynamically
//
@ -605,6 +608,10 @@ UpdateBootManager (
);
}
if (OptionCount == 0) {
HiiCreateSubTitleOpCode (StartOpCodeHandle, STRING_TOKEN (STR_NO_BOOTABLE_MEDIA), 0, 0, 0);
}
if (NeedEndOp) {
HiiCreateEndOpCode (StartOpCodeHandle);
}