diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2013-07-26 03:14:08 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-07-26 03:14:08 +0000 |
commit | 863986b3c8e67736d361b68e293d01e6f92f825c (patch) | |
tree | 15cf067d949655c9defeeeaa78eeea6050845b64 /MdeModulePkg/Universal/DriverSampleDxe | |
parent | 4d0a30a494599226450bf69ad9d6fc689f61712e (diff) | |
download | edk2-platforms-863986b3c8e67736d361b68e293d01e6f92f825c.tar.xz |
Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToText, ConvertTextToDevicePath and ConvertTextToDeviceNode APIs in DevicePathLib.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14505 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe')
3 files changed, 2 insertions, 12 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index cb2cbe7932..d79a81a6d9 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -1798,14 +1798,12 @@ DriverSampleInit ( MY_EFI_VARSTORE_DATA *VarStoreConfig;
EFI_INPUT_KEY HotKey;
EFI_FORM_BROWSER_EXTENSION_PROTOCOL *FormBrowserEx;
- EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *PathToText;
//
// Initialize the local variables.
//
ConfigRequestHdr = NULL;
NewString = NULL;
- PathToText = NULL;
//
// Initialize screen dimensions for SendForm().
@@ -1922,18 +1920,11 @@ DriverSampleInit ( }
PrivateData->HiiHandle[1] = HiiHandle[1];
-
- Status = gBS->LocateProtocol (
- &gEfiDevicePathToTextProtocolGuid,
- NULL,
- (VOID **) &PathToText
- );
- ASSERT_EFI_ERROR (Status);
//
// Update the device path string.
//
- NewString = PathToText->ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)&mHiiVendorDevicePath0, FALSE, FALSE);
+ NewString = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)&mHiiVendorDevicePath0, FALSE, FALSE);
if (HiiSetString (HiiHandle[0], STRING_TOKEN (STR_DEVICE_PATH), NewString, NULL) == 0) {
DriverSampleUnload (ImageHandle);
return EFI_OUT_OF_RESOURCES;
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h index cd546bf388..29870c0f1f 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h @@ -32,7 +32,6 @@ Revision History #include <Protocol/HiiDatabase.h>
#include <Protocol/HiiString.h>
#include <Protocol/FormBrowserEx.h>
-#include <Protocol/DevicePathToText.h>
#include <Guid/MdeModuleHii.h>
#include <Library/DebugLib.h>
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf index 36511e66d0..1affe874bc 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf @@ -55,6 +55,7 @@ HiiLib
PrintLib
UefiLib
+ DevicePathLib
[Guids]
gEfiIfrTianoGuid ## CONSUMES ## Guid
@@ -70,7 +71,6 @@ gEfiHiiDatabaseProtocolGuid ## CONSUMES
gEfiSimpleTextInputExProtocolGuid ## CONSUMES
gEfiFormBrowserExProtocolGuid ## CONSUMES
- gEfiDevicePathToTextProtocolGuid ## CONSUMES
[Depex]
gEfiSimpleTextOutProtocolGuid AND gEfiHiiDatabaseProtocolGuid AND gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid
|