/** @file\r
Rewrite the BootOrder NvVar based on QEMU's "bootorder" fw_cfg file.\r
\r
- Copyright (C) 2012, Red Hat, Inc.\r
+ Copyright (C) 2012 - 2013, Red Hat, Inc.\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
#include <Library/UefiRuntimeServicesTableLib.h>\r
#include <Library/BaseLib.h>\r
#include <Library/PrintLib.h>\r
-#include <Protocol/DevicePathToText.h>\r
+#include <Library/DevicePathLib.h>\r
#include <Guid/GlobalVariable.h>\r
\r
\r
Match (\r
IN CONST CHAR16 *Translated,\r
IN UINTN TranslatedLength,\r
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
- IN CONST EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText\r
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
CHAR16 *Converted;\r
BOOLEAN Result;\r
\r
- Converted = DevPathToText->ConvertDevicePathToText (\r
- DevicePath,\r
- FALSE, // DisplayOnly\r
- FALSE // AllowShortcuts\r
- );\r
+ Converted = ConvertDevicePathToText (\r
+ DevicePath,\r
+ FALSE, // DisplayOnly\r
+ FALSE // AllowShortcuts\r
+ );\r
if (Converted == NULL) {\r
return FALSE;\r
}\r
)\r
{\r
RETURN_STATUS Status;\r
-\r
- EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText;\r
-\r
FIRMWARE_CONFIG_ITEM FwCfgItem;\r
UINTN FwCfgSize;\r
CHAR8 *FwCfg;\r
UINTN TranslatedSize;\r
CHAR16 Translated[TRANSLATION_OUTPUT_SIZE];\r
\r
- Status = gBS->LocateProtocol (\r
- &gEfiDevicePathToTextProtocolGuid,\r
- NULL, // optional registration key\r
- (VOID **) &DevPathToText\r
- );\r
- if (Status != EFI_SUCCESS) {\r
- return Status;\r
- }\r
-\r
Status = QemuFwCfgFindFile ("bootorder", &FwCfgItem, &FwCfgSize);\r
if (Status != RETURN_SUCCESS) {\r
return Status;\r
Match (\r
Translated,\r
TranslatedSize, // contains length, not size, in CHAR16's here\r
- BootOption->DevicePath,\r
- DevPathToText\r
+ BootOption->DevicePath\r
)\r
) {\r
//\r