mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/Bds: Fix delete boot option
- We need to delete the boot option variable from storage not just adjust the BootOrder variable. - The Linux tool 'efibootmgr' still showed the previously removed boot options. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16070 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
01289ec36f
commit
c41bffd380
|
@ -367,6 +367,7 @@ BootOptionDelete (
|
|||
UINTN BootOrderSize;
|
||||
UINT16* BootOrder;
|
||||
UINTN BootOrderCount;
|
||||
CHAR16 BootVariableName[9];
|
||||
EFI_STATUS Status;
|
||||
|
||||
// Remove the entry from the BootOrder environment variable
|
||||
|
@ -399,7 +400,17 @@ BootOptionDelete (
|
|||
);
|
||||
}
|
||||
|
||||
// Delete Boot#### environment variable
|
||||
UnicodeSPrint (BootVariableName, 9 * sizeof(CHAR16), L"Boot%04X", BootOption->LoadOptionIndex);
|
||||
Status = gRT->SetVariable (
|
||||
BootVariableName,
|
||||
&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
0,
|
||||
NULL
|
||||
);
|
||||
|
||||
FreePool (BootOrder);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
return Status;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue