Blame SOURCES/0009-Always-choose-linux-initrd-on-efi-only-platforms.patch

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