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

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