From 863986b3c8e67736d361b68e293d01e6f92f825c Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Fri, 26 Jul 2013 03:14:08 +0000 Subject: Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToText, ConvertTextToDevicePath and ConvertTextToDeviceNode APIs in DevicePathLib. Signed-off-by: Ruiyu Ni Reviewed-by: Feng Tian Reviewed-by: Elvin Li Reviewed-by: Eric Dong Reviewed-by: Star Zeng Reviewed-by: Jaben Carsey Reviewed-by: Guo Dong git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14505 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | 11 +---------- MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h | 1 - MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) (limited to 'MdeModulePkg/Universal/DriverSampleDxe') 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 #include #include -#include #include #include 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 -- cgit v1.2.3