mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
Add some ASSERT()s.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7302 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
49fabc83a5
commit
8c80d3942e
@ -89,8 +89,8 @@ BdsLibDoLegacyBoot (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
BdsLibBootViaBootOption (
|
BdsLibBootViaBootOption (
|
||||||
IN BDS_COMMON_OPTION * Option,
|
IN BDS_COMMON_OPTION *Option,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL * DevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||||
OUT UINTN *ExitDataSize,
|
OUT UINTN *ExitDataSize,
|
||||||
OUT CHAR16 **ExitData OPTIONAL
|
OUT CHAR16 **ExitData OPTIONAL
|
||||||
)
|
)
|
||||||
@ -157,6 +157,7 @@ BdsLibBootViaBootOption (
|
|||||||
&Option->BootCurrent
|
&Option->BootCurrent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ASSERT (Option->DevicePath != NULL);
|
||||||
if ((DevicePathType (Option->DevicePath) == BBS_DEVICE_PATH) &&
|
if ((DevicePathType (Option->DevicePath) == BBS_DEVICE_PATH) &&
|
||||||
(DevicePathSubType (Option->DevicePath) == BBS_BBS_DP)
|
(DevicePathSubType (Option->DevicePath) == BBS_BBS_DP)
|
||||||
) {
|
) {
|
||||||
@ -459,6 +460,7 @@ BdsExpandPartitionPartialDevicePathToFull (
|
|||||||
// If the user try to boot many OS in different HDs or partitions, in theory, the 'HDDP' variable maybe become larger and larger.
|
// If the user try to boot many OS in different HDs or partitions, in theory, the 'HDDP' variable maybe become larger and larger.
|
||||||
//
|
//
|
||||||
InstanceNum = 0;
|
InstanceNum = 0;
|
||||||
|
ASSERT (CachedDevicePath != NULL);
|
||||||
TempNewDevicePath = CachedDevicePath;
|
TempNewDevicePath = CachedDevicePath;
|
||||||
while (!IsDevicePathEnd (TempNewDevicePath)) {
|
while (!IsDevicePathEnd (TempNewDevicePath)) {
|
||||||
TempNewDevicePath = NextDevicePathNode (TempNewDevicePath);
|
TempNewDevicePath = NextDevicePathNode (TempNewDevicePath);
|
||||||
@ -1225,6 +1227,7 @@ BdsLibBootNext (
|
|||||||
//
|
//
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"Boot%04x", *BootNext);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"Boot%04x", *BootNext);
|
||||||
BootOption = BdsLibVariableToOption (&TempList, Buffer);
|
BootOption = BdsLibVariableToOption (&TempList, Buffer);
|
||||||
|
ASSERT (BootOption != NULL);
|
||||||
BdsLibConnectDevicePath (BootOption->DevicePath);
|
BdsLibConnectDevicePath (BootOption->DevicePath);
|
||||||
BdsLibBootViaBootOption (BootOption, BootOption->DevicePath, &ExitDataSize, &ExitData);
|
BdsLibBootViaBootOption (BootOption, BootOption->DevicePath, &ExitDataSize, &ExitData);
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ BdsLibRegisterNewOption (
|
|||||||
&gEfiGlobalVariableGuid,
|
&gEfiGlobalVariableGuid,
|
||||||
&TempOptionSize
|
&TempOptionSize
|
||||||
);
|
);
|
||||||
|
ASSERT (TempOptionPtr != NULL);
|
||||||
//
|
//
|
||||||
// Compare with current option variable
|
// Compare with current option variable
|
||||||
//
|
//
|
||||||
@ -600,6 +600,7 @@ BdsLibBuildOptionFromVar (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Option = BdsLibVariableToOption (BdsCommonOptionList, OptionName);
|
Option = BdsLibVariableToOption (BdsCommonOptionList, OptionName);
|
||||||
|
ASSERT (Option != NULL);
|
||||||
Option->BootCurrent = OptionOrder[Index];
|
Option->BootCurrent = OptionOrder[Index];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user