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
This commit is contained in:
@@ -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);
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user