Blame SOURCES/0044-Fix-setDefaultImage-for-s390-s390x-1285601.patch

24fce8
From 9b6266cdec60130435e9ba61af855e370ec31f1a Mon Sep 17 00:00:00 2001
24fce8
From: Robert Marshall <rmarshall@redhat.com>
24fce8
Date: Tue, 14 Mar 2017 22:25:02 -0400
24fce8
Subject: [PATCH 44/55] Fix setDefaultImage for s390/s390x (#1285601)
24fce8
24fce8
The setDefaultImage routine has never actually supported s390/s390x when
24fce8
picking an arbitrary index because a zipl config never has the property
24fce8
defaultIsIndex set to 1. Eliminating the extraneous check resolved the
24fce8
issue on s390/s390x and does not appear to break other platforms.
24fce8
24fce8
Related: rhbz#1285601
24fce8
---
24fce8
 grubby.c | 3 +--
24fce8
 1 file changed, 1 insertion(+), 2 deletions(-)
24fce8
24fce8
diff --git a/grubby.c b/grubby.c
24fce8
index 9bf051dfed4..5202485a541 100644
24fce8
--- a/grubby.c
24fce8
+++ b/grubby.c
24fce8
@@ -2535,8 +2535,7 @@ void setDefaultImage(struct grubConfig *config, int isAddingBootEntry,
24fce8
 	}
24fce8
 
24fce8
 	/* Case 2: user picked an arbitrary index as the default boot entry */
24fce8
-	if (newDefaultBootEntryIndex >= FIRST_ENTRY_INDEX
24fce8
-	    && config->cfi->defaultIsIndex) {
24fce8
+	if (newDefaultBootEntryIndex >= FIRST_ENTRY_INDEX) {
24fce8
 		indexToVerify = newDefaultBootEntryIndex;
24fce8
 
24fce8
 		/* user chose to make latest boot entry the default */
24fce8
-- 
24fce8
2.17.1
24fce8