mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
Merge 1d508dafa6 into fb2ac429de
This commit is contained in:
commit
6f7f94a357
2 changed files with 24 additions and 15 deletions
|
|
@ -2597,7 +2597,16 @@ EfiBootManagerRefreshAllBootOption (
|
|||
//
|
||||
for (Index = 0; Index < BootOptionCount; Index++) {
|
||||
if (EfiBootManagerFindLoadOption (&BootOptions[Index], NvBootOptions, NvBootOptionCount) == -1) {
|
||||
EfiBootManagerAddLoadOptionVariable (&BootOptions[Index], (UINTN)-1);
|
||||
Status = EfiBootManagerAddLoadOptionVariable (&BootOptions[Index], (UINTN)-1);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"[Bds] Failed to add boot option for '%s': %r\n",
|
||||
BootOptions[Index].Description,
|
||||
Status
|
||||
));
|
||||
}
|
||||
|
||||
//
|
||||
// Try best to add the boot options so continue upon failure.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -267,13 +267,13 @@ structure.
|
|||
VariableAttributes = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS;
|
||||
}
|
||||
|
||||
Status = gRT->SetVariable (
|
||||
OptionName,
|
||||
&gEfiGlobalVariableGuid,
|
||||
VariableAttributes,
|
||||
VariableSize,
|
||||
Variable
|
||||
);
|
||||
Status = BmSetVariableAndReportStatusCodeOnError (
|
||||
OptionName,
|
||||
&gEfiGlobalVariableGuid,
|
||||
VariableAttributes,
|
||||
VariableSize,
|
||||
Variable
|
||||
);
|
||||
FreePool (Variable);
|
||||
|
||||
return Status;
|
||||
|
|
@ -337,13 +337,13 @@ BmAddOptionNumberToOrderVariable (
|
|||
|
||||
NewOptionOrder[Position] = OptionNumber;
|
||||
|
||||
Status = gRT->SetVariable (
|
||||
OptionOrderName,
|
||||
&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
||||
OptionOrderSize + sizeof (UINT16),
|
||||
NewOptionOrder
|
||||
);
|
||||
Status = BmSetVariableAndReportStatusCodeOnError (
|
||||
OptionOrderName,
|
||||
&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
||||
OptionOrderSize + sizeof (UINT16),
|
||||
NewOptionOrder
|
||||
);
|
||||
FreePool (NewOptionOrder);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue