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 --- ShellPkg/Library/UefiSortLib/UefiSortLib.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'ShellPkg/Library/UefiSortLib/UefiSortLib.c') diff --git a/ShellPkg/Library/UefiSortLib/UefiSortLib.c b/ShellPkg/Library/UefiSortLib/UefiSortLib.c index 9cff46d4e6..2aab9d2691 100644 --- a/ShellPkg/Library/UefiSortLib/UefiSortLib.c +++ b/ShellPkg/Library/UefiSortLib/UefiSortLib.c @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -25,8 +24,8 @@ #include #include #include +#include -STATIC EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathToText = NULL; STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL; @@ -224,15 +223,6 @@ DevicePathCompare ( return 1; } - if (mDevicePathToText == NULL) { - Status = gBS->LocateProtocol( - &gEfiDevicePathToTextProtocolGuid, - NULL, - (VOID**)&mDevicePathToText); - - ASSERT_EFI_ERROR(Status); - } - if (mUnicodeCollation == NULL) { Status = gBS->LocateProtocol( &gEfiUnicodeCollation2ProtocolGuid, @@ -242,12 +232,12 @@ DevicePathCompare ( ASSERT_EFI_ERROR(Status); } - TextPath1 = mDevicePathToText->ConvertDevicePathToText( + TextPath1 = ConvertDevicePathToText( DevicePath1, FALSE, FALSE); - TextPath2 = mDevicePathToText->ConvertDevicePathToText( + TextPath2 = ConvertDevicePathToText( DevicePath2, FALSE, FALSE); -- cgit v1.2.3