diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-28 11:50:32 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-28 11:50:32 +0000 |
commit | aa95e2f79c2d8a60c30e1aa69c7cd7077779e039 (patch) | |
tree | e5a90cf22c938a3530d1945489c1af68878d3d94 /ArmPlatformPkg/Bds/BootMenu.c | |
parent | 5b491514ecfefc9a4b11cac789ec3a8e5b8f13f2 (diff) | |
download | edk2-platforms-aa95e2f79c2d8a60c30e1aa69c7cd7077779e039.tar.xz |
ArmPlatformPkg/Bds: Check if the assumed requirements are set before to use it
There were some assumptions that some PCDs and protocols were defined.
Check if these requirements are defined; either print a debug message
to inform the user or skip the statements that require these PCDs or protocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11915 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/BootMenu.c')
-rw-r--r-- | ArmPlatformPkg/Bds/BootMenu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c index 1bcf2ad00f..35c569d0b7 100644 --- a/ArmPlatformPkg/Bds/BootMenu.c +++ b/ArmPlatformPkg/Bds/BootMenu.c @@ -427,7 +427,11 @@ BootMenuMain ( EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol;
Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol);
- ASSERT_EFI_ERROR(Status);
+ if (EFI_ERROR(Status)) {
+ // You must provide an implementation of DevicePathToTextProtocol in your firmware (eg: DevicePathDxe)
+ DEBUG((EFI_D_ERROR,"Error: Bds requires DevicePathToTextProtocol\n"));
+ return Status;
+ }
DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText(BootOption->FilePathList,TRUE,TRUE);
Print(L"\t- %s\n",DevicePathTxt);
|