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 /ShellPkg/Library/UefiSortLib | |
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 'ShellPkg/Library/UefiSortLib')
-rw-r--r-- | ShellPkg/Library/UefiSortLib/UefiSortLib.c | 16 | ||||
-rw-r--r-- | ShellPkg/Library/UefiSortLib/UefiSortLib.inf | 4 |
2 files changed, 5 insertions, 15 deletions
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 <Protocol/UnicodeCollation.h>
#include <Protocol/DevicePath.h>
-#include <Protocol/DevicePathToText.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
@@ -25,8 +24,8 @@ #include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/SortLib.h>
+#include <Library/DevicePathLib.h>
-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. <BR>
+# Copyright (c) 2009 - 2013, 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
@@ -38,9 +38,9 @@ BaseMemoryLib
DebugLib
UefiBootServicesTableLib
+ DevicePathLib
[Protocols]
gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED
gEfiDevicePathProtocolGuid # ALWAYS_CONSUMED
- gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED
|