EFI_STATUS\r
EFIAPI\r
BdsLibBootViaBootOption (\r
- IN BDS_COMMON_OPTION * Option,\r
- IN EFI_DEVICE_PATH_PROTOCOL * DevicePath,\r
+ IN BDS_COMMON_OPTION *Option,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
OUT UINTN *ExitDataSize,\r
OUT CHAR16 **ExitData OPTIONAL\r
)\r
&Option->BootCurrent\r
);\r
\r
+ ASSERT (Option->DevicePath != NULL);\r
if ((DevicePathType (Option->DevicePath) == BBS_DEVICE_PATH) &&\r
(DevicePathSubType (Option->DevicePath) == BBS_BBS_DP)\r
) {\r
// If the user try to boot many OS in different HDs or partitions, in theory, the 'HDDP' variable maybe become larger and larger.\r
//\r
InstanceNum = 0;\r
+ ASSERT (CachedDevicePath != NULL);\r
TempNewDevicePath = CachedDevicePath;\r
while (!IsDevicePathEnd (TempNewDevicePath)) {\r
TempNewDevicePath = NextDevicePathNode (TempNewDevicePath);\r
//\r
UnicodeSPrint (Buffer, sizeof (Buffer), L"Boot%04x", *BootNext);\r
BootOption = BdsLibVariableToOption (&TempList, Buffer);\r
+ ASSERT (BootOption != NULL);\r
BdsLibConnectDevicePath (BootOption->DevicePath);\r
BdsLibBootViaBootOption (BootOption, BootOption->DevicePath, &ExitDataSize, &ExitData);\r
}\r
&gEfiGlobalVariableGuid,\r
&TempOptionSize\r
);\r
-\r
+ ASSERT (TempOptionPtr != NULL);\r
//\r
// Compare with current option variable\r
//\r
}\r
\r
Option = BdsLibVariableToOption (BdsCommonOptionList, OptionName);\r
+ ASSERT (Option != NULL);\r
Option->BootCurrent = OptionOrder[Index];\r
\r
}\r