- 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
UINTN BootOrderSize;\r
UINT16* BootOrder;\r
UINTN BootOrderCount;\r
+ CHAR16 BootVariableName[9];\r
EFI_STATUS Status;\r
\r
// Remove the entry from the BootOrder environment variable\r
);\r
}\r
\r
+ // Delete Boot#### environment variable\r
+ UnicodeSPrint (BootVariableName, 9 * sizeof(CHAR16), L"Boot%04X", BootOption->LoadOptionIndex);\r
+ Status = gRT->SetVariable (\r
+ BootVariableName,\r
+ &gEfiGlobalVariableGuid,\r
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
+ 0,\r
+ NULL\r
+ );\r
+\r
FreePool (BootOrder);\r
\r
- return EFI_SUCCESS;\r
+ return Status;\r
}\r