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:
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This is the shell application
|
||||
#
|
||||
# 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
|
||||
@@ -93,7 +93,6 @@
|
||||
gEfiComponentName2ProtocolGuid # ALWAYS_CONSUMED
|
||||
gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED
|
||||
gEfiDevicePathProtocolGuid # ALWAYS_CONSUMED
|
||||
gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED
|
||||
|
||||
[Pcd]
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel # ALWAYS_CONSUMED
|
||||
|
@@ -115,27 +115,18 @@ InternalShellProtocolDebugPrintMessage (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
{
|
||||
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevicePathToText;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *Temp;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
DEBUG_CODE_BEGIN();
|
||||
DevicePathToText = NULL;
|
||||
|
||||
Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid,
|
||||
NULL,
|
||||
(VOID**)&DevicePathToText);
|
||||
if (Mapping != NULL) {
|
||||
DEBUG((EFI_D_INFO, "Added new map item:\"%S\"\r\n", Mapping));
|
||||
}
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if (DevicePath != NULL) {
|
||||
Temp = DevicePathToText->ConvertDevicePathToText(DevicePath, TRUE, TRUE);
|
||||
DEBUG((EFI_D_INFO, "DevicePath: %S\r\n", Temp));
|
||||
FreePool(Temp);
|
||||
}
|
||||
}
|
||||
Temp = ConvertDevicePathToText(DevicePath, TRUE, TRUE);
|
||||
DEBUG((EFI_D_INFO, "DevicePath: %S\r\n", Temp));
|
||||
FreePool(Temp);
|
||||
|
||||
DEBUG_CODE_END();
|
||||
return (Status);
|
||||
}
|
||||
@@ -647,7 +638,6 @@ EfiShellGetDeviceName(
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_COMPONENT_NAME2_PROTOCOL *CompName2;
|
||||
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevicePathToText;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_HANDLE *HandleList;
|
||||
UINTN HandleCount;
|
||||
@@ -815,28 +805,19 @@ EfiShellGetDeviceName(
|
||||
}
|
||||
}
|
||||
if ((Flags & EFI_DEVICE_NAME_USE_DEVICE_PATH) != 0) {
|
||||
Status = gBS->LocateProtocol(
|
||||
&gEfiDevicePathToTextProtocolGuid,
|
||||
Status = gBS->OpenProtocol(
|
||||
DeviceHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID**)&DevicePath,
|
||||
gImageHandle,
|
||||
NULL,
|
||||
(VOID**)&DevicePathToText);
|
||||
//
|
||||
// we now have the device path to text protocol
|
||||
//
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->OpenProtocol(
|
||||
DeviceHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID**)&DevicePath,
|
||||
gImageHandle,
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// use device path to text on the device path
|
||||
//
|
||||
*BestDeviceName = DevicePathToText->ConvertDevicePathToText(DevicePath, TRUE, TRUE);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
//
|
||||
// use device path to text on the device path
|
||||
//
|
||||
*BestDeviceName = ConvertDevicePathToText(DevicePath, TRUE, TRUE);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -1583,11 +1564,11 @@ EfiShellExecute(
|
||||
DevPath = AppendDevicePath (ShellInfoObject.ImageDevPath, ShellInfoObject.FileDevPath);
|
||||
|
||||
DEBUG_CODE_BEGIN();
|
||||
Temp = gDevPathToText->ConvertDevicePathToText(ShellInfoObject.FileDevPath, TRUE, TRUE);
|
||||
Temp = ConvertDevicePathToText(ShellInfoObject.FileDevPath, TRUE, TRUE);
|
||||
FreePool(Temp);
|
||||
Temp = gDevPathToText->ConvertDevicePathToText(ShellInfoObject.ImageDevPath, TRUE, TRUE);
|
||||
Temp = ConvertDevicePathToText(ShellInfoObject.ImageDevPath, TRUE, TRUE);
|
||||
FreePool(Temp);
|
||||
Temp = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, TRUE);
|
||||
Temp = ConvertDevicePathToText(DevPath, TRUE, TRUE);
|
||||
FreePool(Temp);
|
||||
DEBUG_CODE_END();
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
This library is for use ONLY by shell commands linked into the shell application.
|
||||
This library will not funciton if it is used for UEFI Shell 2.0 Applications.
|
||||
|
||||
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
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <Protocol/EfiShell.h>
|
||||
#include <Protocol/EfiShellParameters.h>
|
||||
#include <Protocol/UnicodeCollation.h>
|
||||
#include <Protocol/DevicePathToText.h>
|
||||
#include <Protocol/SimpleFileSystem.h>
|
||||
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
@@ -33,7 +32,6 @@
|
||||
// The extern global protocol poionters.
|
||||
//
|
||||
extern EFI_UNICODE_COLLATION_PROTOCOL *gUnicodeCollation;
|
||||
extern EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *gDevPathToText;
|
||||
extern CONST CHAR16* SupportLevel[];
|
||||
|
||||
//
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
|
@@ -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,
|
||||
|
@@ -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>
|
||||
|
@@ -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,
|
||||
|
@@ -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;
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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 (
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -26,7 +26,7 @@
|
||||
[LibraryClasses.common]
|
||||
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
||||
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
|
||||
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
||||
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.inf
|
||||
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
|
||||
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
||||
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
||||
|
Reference in New Issue
Block a user