diff options
author | Harry Liebel <Harry.Liebel@arm.com> | 2014-09-09 15:58:33 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-09-09 15:58:33 +0000 |
commit | c41bffd3805f6bd4cbe817c969d21485040f1e3a (patch) | |
tree | c2459dffa194dc675200bb49839752f8d0770c16 /ArmPlatformPkg/Bds | |
parent | 01289ec36fc530aebefa38085655d1d656b3339f (diff) | |
download | edk2-c41bffd3805f6bd4cbe817c969d21485040f1e3a.tar.gz edk2-c41bffd3805f6bd4cbe817c969d21485040f1e3a.tar.bz2 edk2-c41bffd3805f6bd4cbe817c969d21485040f1e3a.zip |
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
Diffstat (limited to 'ArmPlatformPkg/Bds')
-rw-r--r-- | ArmPlatformPkg/Bds/BootOption.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c index 8ed636b53b..5712d2ccb4 100644 --- a/ArmPlatformPkg/Bds/BootOption.c +++ b/ArmPlatformPkg/Bds/BootOption.c @@ -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;
}
|