From fd966254fc3e6ad1ee3187862b2e86575ebb55b4 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Fri, 28 Mar 2014 15:36:53 -0400
Subject: [PATCH 09/41] Always choose "linux"/"initrd" on efi-only platforms.
Which basically just means Aarch64.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grubby.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/grubby.c b/grubby.c
index 0205882..895ed06 100644
--- a/grubby.c
+++ b/grubby.c
@@ -60,6 +60,12 @@ int debug = 0; /* Currently just for template debugging */
int isEfi = 0;
+#if defined(__arch64__)
+#define isEfiOnly 1
+#else
+#define isEfiOnly 0
+#endif
+
char *saved_command_line = NULL;
/* comments get lumped in with indention */
@@ -714,17 +720,10 @@ static enum lineType_e preferredLineType(enum lineType_e type,
struct configFileInfo *cfi) {
if (isEfi && cfi == &grub2ConfigType) {
switch (type) {
-#if defined(__aarch64__)
case LT_KERNEL:
- return LT_KERNEL;
+ return isEfiOnly ? LT_KERNEL : LT_KERNEL_EFI;
case LT_INITRD:
- return LT_INITRD;
-#else
- case LT_KERNEL:
- return LT_KERNEL_EFI;
- case LT_INITRD:
- return LT_INITRD_EFI;
-#endif
+ return isEfiOnly ? LT_INITRD : LT_INITRD_EFI;
default:
return type;
}
--
2.4.3