summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-06-01 03:39:39 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-06-01 03:39:39 +0000
commit16e5944abde9ea3f01c9ccff2a86a41e5a6a1dd0 (patch)
tree7cc5e5a08187212a83be8953ea9bbf2b7227d104 /IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
parent38fcd0270fff574ac82e2acad451fbcb36674398 (diff)
downloadedk2-platforms-16e5944abde9ea3f01c9ccff2a86a41e5a6a1dd0.tar.xz
Refine BdsDxe driver and GenericBdsLib library so that the GenericBdsLib doesn't depend on the BdsDxe implementation.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13418 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c40
1 files changed, 8 insertions, 32 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
index e267935c7f..d00d0978b0 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
@@ -1,7 +1,7 @@
/** @file
Utility routines used by boot maintenance modules.
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -16,36 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
- Find the first instance of this Protocol
- in the system and return it's interface.
-
-
- @param ProtocolGuid Provides the protocol to search for
- @param Interface On return, a pointer to the first interface
- that matches ProtocolGuid
-
- @retval EFI_SUCCESS A protocol instance matching ProtocolGuid was found
- @retval EFI_NOT_FOUND No protocol instances were found that match ProtocolGuid
-
-**/
-EFI_STATUS
-EfiLibLocateProtocol (
- IN EFI_GUID *ProtocolGuid,
- OUT VOID **Interface
- )
-{
- EFI_STATUS Status;
-
- Status = gBS->LocateProtocol (
- ProtocolGuid,
- NULL,
- (VOID **) Interface
- );
- return Status;
-}
-
-/**
-
Function opens and returns a file handle to the root directory of a volume.
@param DeviceHandle A handle for a device
@@ -201,7 +171,13 @@ EfiLibDeleteVariable (
//
// Delete variable from Storage
//
- Status = gRT->SetVariable (VarName, VarGuid, VAR_FLAG, 0, NULL);
+ Status = gRT->SetVariable (
+ VarName,
+ VarGuid,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+ 0,
+ NULL
+ );
ASSERT (!EFI_ERROR (Status));
FreePool (VarBuf);
}