]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToTe...
[mirror_edk2.git] / ShellPkg / Library / UefiHandleParsingLib / UefiHandleParsingLib.c
index 45ee9bd5d00164ff7f7cfbcf19a0b1fed062ce65..0c78d0da20253d98d42802c5c8c5b6efd1aae9c9 100644 (file)
@@ -414,19 +414,15 @@ DevicePathProtocolDumpInformation(
   CHAR16                            *Temp;\r
   CHAR16                            *Temp2;\r
   EFI_STATUS                        Status;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevPathToText;\r
   Temp = NULL;\r
 \r
-  Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID**)&DevPathToText);\r
+  Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
   if (!EFI_ERROR(Status)) {\r
-    Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
-    if (!EFI_ERROR(Status)) {\r
-      //\r
-      // I cannot decide whether to allow shortcuts here (the second BOOLEAN on the next line)\r
-      //\r
-      Temp = DevPathToText->ConvertDevicePathToText(DevPath, TRUE, TRUE);\r
-      gBS->CloseProtocol(TheHandle, &gEfiDevicePathProtocolGuid, gImageHandle, NULL);\r
-    }\r
+    //\r
+    // I cannot decide whether to allow shortcuts here (the second BOOLEAN on the next line)\r
+    //\r
+    Temp = ConvertDevicePathToText(DevPath, TRUE, TRUE);\r
+    gBS->CloseProtocol(TheHandle, &gEfiDevicePathProtocolGuid, gImageHandle, NULL);\r
   }\r
   if (!Verbose && Temp != NULL && StrLen(Temp) > 30) {\r
     Temp2 = NULL;\r