EFI_DEVICE_PATH* DevicePath;\r
EFI_DEVICE_PATH_PROTOCOL *DevicePathNode;\r
\r
- Attributes = 0;\r
+ Attributes = 0;\r
+ SupportedBootDevice = NULL;\r
\r
//\r
// List the Boot Devices supported\r
UINTN Index;\r
UINTN BootMainEntryCount;\r
\r
+ BootOption = NULL;\r
BootMainEntryCount = sizeof(BootMainEntries) / sizeof(struct BOOT_MAIN_ENTRY);\r
-
+\r
// Get Boot#### list\r
BootOptionList (&BootOptionsList);\r
\r
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol;\r
\r
Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol);\r
- ASSERT_EFI_ERROR(Status);\r
+ if (EFI_ERROR(Status)) {\r
+ // You must provide an implementation of DevicePathToTextProtocol in your firmware (eg: DevicePathDxe)\r
+ DEBUG((EFI_D_ERROR,"Error: Bds requires DevicePathToTextProtocol\n"));\r
+ return Status;\r
+ }\r
DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText(BootOption->FilePathList,TRUE,TRUE);\r
\r
Print(L"\t- %s\n",DevicePathTxt);\r
if (BootOption->OptionalData != NULL) {\r
- Print(L"\t- LoaderType: %d\n",BootOption->OptionalData->LoaderType);\r
+ Print(L"\t- LoaderType: %d\n", ReadUnaligned32 (&BootOption->OptionalData->LoaderType));\r
if (BootOption->OptionalData->Arguments != NULL) {\r
Print(L"\t- Arguments: %a\n",BootOption->OptionalData->Arguments);\r
}\r