]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c
Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToTe...
[mirror_edk2.git] / ShellPkg / Library / UefiShellDriver1CommandsLib / Unload.c
index 940f72d89a4a713fe6f331749e7398e81d03a879..4e1ac0da82533187a7db42bcfb16b3408987afcb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for Unload shell Driver1 function.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -67,7 +67,6 @@ DumpLoadedImageProtocolInfo (
 {\r
   EFI_LOADED_IMAGE_PROTOCOL         *Image;\r
   EFI_STATUS                        Status;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathToText;\r
   CHAR16                            *DevicePathText;\r
   CHAR16                            *CodeTypeText;\r
   CHAR16                            *DataTypeText;\r
@@ -79,23 +78,10 @@ DumpLoadedImageProtocolInfo (
   if (EFI_ERROR(Status)) {\r
     return (EFI_INVALID_PARAMETER);\r
   }\r
-\r
-  Status = gBS->LocateProtocol(\r
-    &gEfiDevicePathToTextProtocolGuid,\r
-    NULL,\r
-    (VOID**)&DevicePathToText);\r
-  //\r
-  // we now have the device path to text protocol\r
-  //\r
-  if (!EFI_ERROR(Status)) {\r
-    DevicePathText = DevicePathToText->ConvertDevicePathToText(Image->FilePath, TRUE, TRUE);\r
-  } else {\r
-    DevicePathText = NULL;\r
-  }\r
-\r
-  CodeTypeText = ConvertMemoryType(Image->ImageCodeType);\r
-  DataTypeText = ConvertMemoryType(Image->ImageDataType);\r
-  PdbPointer = (CHAR8*)PeCoffLoaderGetPdbPointer(Image->ImageBase);\r
+  DevicePathText = ConvertDevicePathToText(Image->FilePath, TRUE, TRUE);\r
+  CodeTypeText   = ConvertMemoryType(Image->ImageCodeType);\r
+  DataTypeText   = ConvertMemoryType(Image->ImageDataType);\r
+  PdbPointer     = (CHAR8*)PeCoffLoaderGetPdbPointer(Image->ImageBase);\r
   ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_UNLOAD_VERBOSE), gShellDriver1HiiHandle,\r
     ConvertHandleToHandleIndex(TheHandle),\r
     TheHandle,\r