summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Bds
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPlatformPkg/Bds')
-rw-r--r--ArmPlatformPkg/Bds/Bds.inf1
-rw-r--r--ArmPlatformPkg/Bds/BdsHelper.c4
-rw-r--r--ArmPlatformPkg/Bds/BdsInternal.h3
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c10
-rw-r--r--ArmPlatformPkg/Bds/BootOptionSupport.c2
5 files changed, 11 insertions, 9 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.inf b/ArmPlatformPkg/Bds/Bds.inf
index bd162fa6be..0bcb72ed54 100644
--- a/ArmPlatformPkg/Bds/Bds.inf
+++ b/ArmPlatformPkg/Bds/Bds.inf
@@ -45,6 +45,7 @@
UefiDriverEntryPoint
DebugLib
PrintLib
+ BaseLib
[Guids]
gEfiFileSystemInfoGuid
diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c
index 7bbe8b89bd..bdfaafad2c 100644
--- a/ArmPlatformPkg/Bds/BdsHelper.c
+++ b/ArmPlatformPkg/Bds/BdsHelper.c
@@ -239,7 +239,7 @@ GenerateDeviceDescriptionName (
//TODO: Fixme. we must find the best langague
Status = ComponentName2Protocol->GetDriverName (ComponentName2Protocol,"en",&DriverName);
if (!EFI_ERROR(Status)) {
- StrnCpy (Description,DriverName,BOOT_DEVICE_DESCRIPTION_MAX);
+ StrnCpy (Description, DriverName, BOOT_DEVICE_DESCRIPTION_MAX);
}
}
@@ -254,7 +254,7 @@ GenerateDeviceDescriptionName (
DevicePathNode = GetLastDevicePathNode (DevicePathProtocol);
Status = gBS->LocateProtocol (&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol);
ASSERT_EFI_ERROR(Status);
- DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText(DevicePathNode,TRUE,TRUE);
+ DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText (DevicePathNode, TRUE, TRUE);
StrnCpy (Description, DevicePathTxt, BOOT_DEVICE_DESCRIPTION_MAX);
FreePool (DevicePathTxt);
}
diff --git a/ArmPlatformPkg/Bds/BdsInternal.h b/ArmPlatformPkg/Bds/BdsInternal.h
index 3f2d1a63d2..fd49d9e499 100644
--- a/ArmPlatformPkg/Bds/BdsInternal.h
+++ b/ArmPlatformPkg/Bds/BdsInternal.h
@@ -42,6 +42,9 @@
#define IS_ARM_BDS_BOOTENTRY(ptr) (ReadUnaligned32 ((CONST UINT32*)&((ARM_BDS_LOADER_OPTIONAL_DATA*)((ptr)->OptionalData))->Header.Signature) == ARM_BDS_OPTIONAL_DATA_SIGNATURE)
+#define UPDATE_BOOT_ENTRY L"Update entry: "
+#define DELETE_BOOT_ENTRY L"Delete entry: "
+
typedef enum {
BDS_LOADER_EFI_APPLICATION = 0,
BDS_LOADER_KERNEL_LINUX_ATAG,
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index 94be464f80..543958bf17 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -315,7 +315,7 @@ BootMenuRemoveBootOption (
EFI_STATUS Status;
BDS_LOAD_OPTION_ENTRY* BootOptionEntry;
- Status = BootMenuSelectBootOption (BootOptionsList, L"Delete entry: ", FALSE, &BootOptionEntry);
+ Status = BootMenuSelectBootOption (BootOptionsList, DELETE_BOOT_ENTRY, FALSE, &BootOptionEntry);
if (EFI_ERROR(Status)) {
return Status;
}
@@ -352,7 +352,7 @@ BootMenuUpdateBootOption (
UINTN InitrdSize;
UINTN CmdLineSize;
- Status = BootMenuSelectBootOption (BootOptionsList, L"Update entry: ", TRUE, &BootOptionEntry);
+ Status = BootMenuSelectBootOption (BootOptionsList, UPDATE_BOOT_ENTRY, TRUE, &BootOptionEntry);
if (EFI_ERROR(Status)) {
return Status;
}
@@ -476,8 +476,7 @@ BootMenuManager (
BootManagerEntries[OptionSelected-1].Callback (BootOptionsList);
}
}
-
- return EFI_SUCCESS;
+ // Should never go here
}
EFI_STATUS
@@ -619,6 +618,5 @@ BootMenuMain (
Status = BootOptionStart (BootOption);
}
}
-
- return Status;
+ // Should never go here
}
diff --git a/ArmPlatformPkg/Bds/BootOptionSupport.c b/ArmPlatformPkg/Bds/BootOptionSupport.c
index 4c37c9de88..fb383b6f24 100644
--- a/ArmPlatformPkg/Bds/BootOptionSupport.c
+++ b/ArmPlatformPkg/Bds/BootOptionSupport.c
@@ -209,7 +209,7 @@ BootDeviceGetDeviceSupport (
// Find which supported device is the most appropriate
for (Index = 0; Index < BDS_DEVICE_MAX; Index++) {
- if (BdsLoadOptionSupportList[Index].IsSupported(BootOption)) {
+ if (BdsLoadOptionSupportList[Index].IsSupported (BootOption)) {
*DeviceSupport = &BdsLoadOptionSupportList[Index];
return EFI_SUCCESS;
}