diff options
Diffstat (limited to 'ShellPkg/Library')
23 files changed, 44 insertions, 101 deletions
diff --git a/ShellPkg/Library/UefiDpLib/DpUtilities.c b/ShellPkg/Library/UefiDpLib/DpUtilities.c index 89c9919e03..57c81288da 100644 --- a/ShellPkg/Library/UefiDpLib/DpUtilities.c +++ b/ShellPkg/Library/UefiDpLib/DpUtilities.c @@ -31,7 +31,6 @@ #include <Protocol/DriverBinding.h>
#include <Protocol/ComponentName2.h>
#include <Protocol/DevicePath.h>
-#include <Protocol/DevicePathToText.h>
#include <Guid/Performance.h>
@@ -204,7 +203,6 @@ GetNameFromHandle ( UINTN StringSize;
CHAR8 *PlatformLanguage;
EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2;
- EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevicePathToText;
//
// Method 1: Get the name string from image PDB
@@ -320,19 +318,12 @@ GetNameFromHandle ( //
// Method 5: Get the name string from image DevicePath
//
- Status = gBS->LocateProtocol (
- &gEfiDevicePathToTextProtocolGuid,
- NULL,
- (VOID **) &DevicePathToText
- );
- if (!EFI_ERROR (Status)) {
- NameString = DevicePathToText->ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);
- if (NameString != NULL) {
- StrnCpy (mGaugeString, NameString, DP_GAUGE_STRING_LENGTH);
- mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;
- FreePool (NameString);
- return;
- }
+ NameString = ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);
+ if (NameString != NULL) {
+ StrnCpy (mGaugeString, NameString, DP_GAUGE_STRING_LENGTH);
+ mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;
+ FreePool (NameString);
+ return;
}
}
}
diff --git a/ShellPkg/Library/UefiDpLib/UefiDpLib.h b/ShellPkg/Library/UefiDpLib/UefiDpLib.h index 2cec991483..d16f55fe02 100644 --- a/ShellPkg/Library/UefiDpLib/UefiDpLib.h +++ b/ShellPkg/Library/UefiDpLib/UefiDpLib.h @@ -25,7 +25,6 @@ extern EFI_GUID gDpHiiGuid; #include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/UnicodeCollation.h>
-#include <Protocol/DevicePathToText.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
diff --git a/ShellPkg/Library/UefiDpLib/UefiDpLib.inf b/ShellPkg/Library/UefiDpLib/UefiDpLib.inf index cb53a59496..9488a49813 100644 --- a/ShellPkg/Library/UefiDpLib/UefiDpLib.inf +++ b/ShellPkg/Library/UefiDpLib/UefiDpLib.inf @@ -62,13 +62,13 @@ UefiBootServicesTableLib
SortLib
PrintLib
+ DevicePathLib
[Protocols]
gEfiLoadedImageProtocolGuid # ALWAYS_CONSUMED
gEfiDriverBindingProtocolGuid # SOMETIMES_CONSUMED
gEfiComponentName2ProtocolGuid # SOMETIMES_CONSUMED
gEfiLoadedImageDevicePathProtocolGuid # SOMETIMES_CONSUMED
- gEfiDevicePathToTextProtocolGuid # SOMETIMES_CONSUMED
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index 45ee9bd5d0..0c78d0da20 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -414,19 +414,15 @@ DevicePathProtocolDumpInformation( CHAR16 *Temp;
CHAR16 *Temp2;
EFI_STATUS Status;
- EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText;
Temp = NULL;
- Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID**)&DevPathToText);
+ Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (!EFI_ERROR(Status)) {
- Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
- if (!EFI_ERROR(Status)) {
- //
- // I cannot decide whether to allow shortcuts here (the second BOOLEAN on the next line)
- //
- Temp = DevPathToText->ConvertDevicePathToText(DevPath, TRUE, TRUE);
- gBS->CloseProtocol(TheHandle, &gEfiDevicePathProtocolGuid, gImageHandle, NULL);
- }
+ //
+ // I cannot decide whether to allow shortcuts here (the second BOOLEAN on the next line)
+ //
+ Temp = ConvertDevicePathToText(DevPath, TRUE, TRUE);
+ gBS->CloseProtocol(TheHandle, &gEfiDevicePathProtocolGuid, gImageHandle, NULL);
}
if (!Verbose && Temp != NULL && StrLen(Temp) > 30) {
Temp2 = NULL;
diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c index 88c78ee15e..935e8397fe 100644 --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c @@ -30,7 +30,6 @@ STATIC BUFFER_LIST mFileHandleList; // global variables required by library class.
EFI_UNICODE_COLLATION_PROTOCOL *gUnicodeCollation = NULL;
-EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *gDevPathToText = NULL;
SHELL_MAP_LIST gShellMapList;
SHELL_MAP_LIST *gShellCurDir = NULL;
@@ -58,12 +57,6 @@ CommandInit( return (EFI_DEVICE_ERROR);
}
}
- if (gDevPathToText == NULL) {
- Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID**)&gDevPathToText);
- if (EFI_ERROR(Status)) {
- return (EFI_DEVICE_ERROR);
- }
- }
return (EFI_SUCCESS);
}
@@ -184,7 +177,6 @@ ShellCommandLibDestructor ( }
gUnicodeCollation = NULL;
- gDevPathToText = NULL;
gShellCurDir = NULL;
return (RETURN_SUCCESS);
diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf index 6b3d774f47..5768059487 100644 --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf @@ -1,7 +1,7 @@ ## @file
# Provides interface to shell internal functions for shell commands.
#
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved. <BR>
+# Copyright (c) 2006 - 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
@@ -52,7 +52,6 @@ gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED
gEfiShellProtocolGuid # ALWAYS_CONSUMED
gEfiShellParametersProtocolGuid # ALWAYS_CONSUMED
- gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED
[Guids]
gEfiSasDevicePathGuid # ALWAYS_CONSUMED
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Bcfg.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Bcfg.c index c26fad7b38..87f2383fad 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Bcfg.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Bcfg.c @@ -1,7 +1,7 @@ /** @file
Main file for bcfg shell Debug1 function.
- Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -1052,7 +1052,7 @@ BcfgDisplayDumpDebug1( if ((*(UINT16*)(Buffer+4)) != 0) {
DevPath = AllocateZeroPool(*(UINT16*)(Buffer+4));
CopyMem(DevPath, Buffer+6+StrSize((CHAR16*)(Buffer+6)), *(UINT16*)(Buffer+4));
- DevPathString = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, FALSE);
+ DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE);
} else {
DevPath = NULL;
DevPathString = NULL;
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c index 34eb6af8ac..8d26c9d93b 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c @@ -1,7 +1,7 @@ /** @file
Main file for SetVar shell Debug1 function.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -49,7 +49,6 @@ ShellCommandRunSetVar ( UINTN Size;
UINTN LoopVar;
EFI_DEVICE_PATH_PROTOCOL *DevPath;
- EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *DevPathFromText;
ShellStatus = SHELL_SUCCESS;
Status = EFI_SUCCESS;
@@ -226,9 +225,7 @@ ShellCommandRunSetVar ( //
Data++;
Data++;
- Status = gBS->LocateProtocol(&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID**)&DevPathFromText);
- ASSERT_EFI_ERROR(Status);
- DevPath = DevPathFromText->ConvertTextToDevicePath(Data);
+ DevPath = ConvertTextToDevicePath(Data);
if (DevPath == NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SETVAR_ERROR_DPFT), gShellDebug1HiiHandle, Status);
ShellStatus = SHELL_INVALID_PARAMETER;
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h index bbc539126b..d8755bfefc 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h @@ -1,7 +1,7 @@ /** @file
Main file for NULL named library for Profile1 shell command functions.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -29,7 +29,6 @@ #include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/UnicodeCollation.h>
-#include <Protocol/DevicePathToText.h>
#include <Protocol/DriverDiagnostics2.h>
#include <Protocol/DriverDiagnostics.h>
#include <Protocol/PlatformDriverOverride.h>
@@ -38,7 +37,6 @@ #include <Protocol/DriverSupportedEfiVersion.h>
#include <Protocol/DriverFamilyOverride.h>
#include <Protocol/DriverHealth.h>
-#include <Protocol/DevicePathFromText.h>
#include <Protocol/SimplePointer.h>
#include <Protocol/PciRootBridgeIo.h>
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c index 9947c56117..bfbd8d76b0 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c @@ -1,7 +1,7 @@ /** @file
Main file for Dh shell Driver1 function.
- Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -260,7 +260,7 @@ GetDriverImageName ( return (Status);
}
DevicePath = LoadedImage->FilePath;
- *Name = gDevPathToText->ConvertDevicePathToText(DevicePath, TRUE, TRUE);
+ *Name = ConvertDevicePathToText(DevicePath, TRUE, TRUE);
return (EFI_SUCCESS);
}
@@ -354,7 +354,7 @@ DisplayDriverModelHandle ( ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DRIVER1), gShellDriver1HiiHandle, TempStringPointer!=NULL?TempStringPointer:L"<Unknown>");
SHELL_FREE_NON_NULL(TempStringPointer);
- TempStringPointer = gDevPathToText->ConvertDevicePathToText(DevicePath, TRUE, FALSE);
+ TempStringPointer = ConvertDevicePathToText(DevicePath, TRUE, FALSE);
ShellPrintHiiEx(
-1,
-1,
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c index 1f7675b8b5..fe314f70f8 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c @@ -1,7 +1,7 @@ /** @file
Main file for Drivers shell Driver1 function.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -80,7 +80,7 @@ GetDevicePathTextForHandle( }
RetVal = gEfiShellProtocol->GetFilePathFromDevicePath(FinalPath);
if (RetVal == NULL) {
- RetVal = gDevPathToText->ConvertDevicePathToText(FinalPath, TRUE, TRUE);
+ RetVal = ConvertDevicePathToText(FinalPath, TRUE, TRUE);
}
FreePool(FinalPath);
return (RetVal);
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c index b82bdf8f36..35ddd441b1 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c @@ -1,7 +1,7 @@ /** @file
Main file for DrvCfg shell Driver1 function.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -406,7 +406,7 @@ ConfigFromFile( //
// print out an error.
//
- TempDevPathString = gDevPathToText->ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)(((CHAR8*)PackageHeader) + sizeof(EFI_HII_PACKAGE_HEADER)), TRUE, TRUE);
+ TempDevPathString = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)(((CHAR8*)PackageHeader) + sizeof(EFI_HII_PACKAGE_HEADER)), TRUE, TRUE);
ShellPrintHiiEx(
-1,
-1,
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h index 19633a4b71..46ba8fdd8f 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h @@ -1,7 +1,7 @@ /** @file
Main file for NULL named library for Profile1 shell command functions.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -28,7 +28,6 @@ #include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/UnicodeCollation.h>
-#include <Protocol/DevicePathToText.h>
#include <Protocol/DriverDiagnostics2.h>
#include <Protocol/DriverDiagnostics.h>
#include <Protocol/PlatformDriverOverride.h>
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c index 940f72d89a..4e1ac0da82 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c @@ -1,7 +1,7 @@ /** @file
Main file for Unload shell Driver1 function.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -67,7 +67,6 @@ DumpLoadedImageProtocolInfo ( {
EFI_LOADED_IMAGE_PROTOCOL *Image;
EFI_STATUS Status;
- EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevicePathToText;
CHAR16 *DevicePathText;
CHAR16 *CodeTypeText;
CHAR16 *DataTypeText;
@@ -79,23 +78,10 @@ DumpLoadedImageProtocolInfo ( if (EFI_ERROR(Status)) {
return (EFI_INVALID_PARAMETER);
}
-
- Status = gBS->LocateProtocol(
- &gEfiDevicePathToTextProtocolGuid,
- NULL,
- (VOID**)&DevicePathToText);
- //
- // we now have the device path to text protocol
- //
- if (!EFI_ERROR(Status)) {
- DevicePathText = DevicePathToText->ConvertDevicePathToText(Image->FilePath, TRUE, TRUE);
- } else {
- DevicePathText = NULL;
- }
-
- CodeTypeText = ConvertMemoryType(Image->ImageCodeType);
- DataTypeText = ConvertMemoryType(Image->ImageDataType);
- PdbPointer = (CHAR8*)PeCoffLoaderGetPdbPointer(Image->ImageBase);
+ DevicePathText = ConvertDevicePathToText(Image->FilePath, TRUE, TRUE);
+ CodeTypeText = ConvertMemoryType(Image->ImageCodeType);
+ DataTypeText = ConvertMemoryType(Image->ImageDataType);
+ PdbPointer = (CHAR8*)PeCoffLoaderGetPdbPointer(Image->ImageBase);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_UNLOAD_VERBOSE), gShellDriver1HiiHandle,
ConvertHandleToHandleIndex(TheHandle),
TheHandle,
diff --git a/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c b/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c index 5dcbfb6950..390f1b6da9 100644 --- a/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c +++ b/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c @@ -1050,7 +1050,7 @@ BcfgDisplayDumpInstall1( if ((*(UINT16*)(Buffer+4)) != 0) {
DevPath = AllocateZeroPool(*(UINT16*)(Buffer+4));
CopyMem(DevPath, Buffer+6+StrSize((CHAR16*)(Buffer+6)), *(UINT16*)(Buffer+4));
- DevPathString = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, FALSE);
+ DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE);
} else {
DevPath = NULL;
DevPathString = NULL;
diff --git a/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.h b/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.h index 09207c0698..8b47a29a86 100644 --- a/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.h +++ b/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.h @@ -1,7 +1,7 @@ /** @file
Main file for NULL named library for install 1 shell command functions.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -25,7 +25,6 @@ #include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/UnicodeCollation.h>
-#include <Protocol/DevicePathToText.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h index b0ef503158..c4ef536202 100644 --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h @@ -1,7 +1,7 @@ /** @file
Main file for NULL named library for level 1 shell command functions.
- 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
which accompanies this distribution. The full text of the license may be found at
@@ -25,7 +25,6 @@ #include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/UnicodeCollation.h>
-#include <Protocol/DevicePathToText.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c index 2725f4ad39..bd004beaaf 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c @@ -421,7 +421,7 @@ PerformSingleMappingDisplay( if (TempSpot != NULL) {
*TempSpot = CHAR_NULL;
}
- DevPathString = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, FALSE);
+ DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE);
if (!SFO) {
TempLen = StrLen(CurrentName);
ShellPrintHiiEx (
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h index 2018247573..8abf7e02a8 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h @@ -9,7 +9,7 @@ * functions are non-interactive only
- 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
which accompanies this distribution. The full text of the license may be found at
@@ -33,7 +33,6 @@ #include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/UnicodeCollation.h>
-#include <Protocol/DevicePathToText.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf index 5787c817f9..52844429ea 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf @@ -1,7 +1,7 @@ ## @file
# Provides shell level 2 functions
#
-# 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
@@ -65,6 +65,7 @@ HiiLib
HandleParsingLib
PathLib
+ DevicePathLib
[Protocols]
gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED
@@ -73,7 +74,6 @@ gEfiDevicePathProtocolGuid # ALWAYS_CONSUMED
gEfiLoadedImageProtocolGuid # ALWAYS_CONSUMED
gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED
- gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED
[Pcd.common]
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel # ALWAYS_CONSUMED
diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.h b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.h index 5636d497c0..bd5b9bec9c 100644 --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.h +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.h @@ -25,7 +25,6 @@ #include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/UnicodeCollation.h>
-#include <Protocol/DevicePathToText.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
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
|