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