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 +++------------- ShellPkg/Library/UefiSortLib/UefiSortLib.inf | 4 ++-- 2 files changed, 5 insertions(+), 15 deletions(-) (limited to 'ShellPkg/Library/UefiSortLib') 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); diff --git a/ShellPkg/Library/UefiSortLib/UefiSortLib.inf b/ShellPkg/Library/UefiSortLib/UefiSortLib.inf index 8080cc0c82..31afb27920 100644 --- a/ShellPkg/Library/UefiSortLib/UefiSortLib.inf +++ b/ShellPkg/Library/UefiSortLib/UefiSortLib.inf @@ -1,7 +1,7 @@ ## @file # Library used for sorting routines. # -# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -38,9 +38,9 @@ BaseMemoryLib DebugLib UefiBootServicesTableLib + DevicePathLib [Protocols] gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED gEfiDevicePathProtocolGuid # ALWAYS_CONSUMED - gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED -- cgit v1.2.3