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
This commit is contained in:
@@ -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
|
||||
@@ -14,36 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
#include "BootMaint.h"
|
||||
|
||||
/**
|
||||
|
||||
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.
|
||||
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user