Blob Blame History Raw
From 007bad21878d74600575ed8791a5ecb9dea3c49d Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Wed, 11 Aug 2010 17:02:20 -0400
Subject: [PATCH 4/6] Make sure "nomodeset" and "xdriver=" get passed on to stage2 (#623129).

---
 loader/loader.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index f14713b..3588bce 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1134,7 +1134,9 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
                 splitProxyParam(v, &loaderData->proxyUser,
                                 &loaderData->proxyPassword, &loaderData->proxy);
             }
-        } else if (numExtraArgs < (MAX_EXTRA_ARGS - 1)) {
+        }
+
+        if (numExtraArgs < (MAX_EXTRA_ARGS - 1)) {
             /* go through and append args we just want to pass on to  */
             /* the anaconda script, but don't want to represent as a  */
             /* LOADER_FLAGS_XXX since loader doesn't care about these */
@@ -1153,6 +1155,7 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
                        !strcasecmp(k, "dmraid") ||
                        !strcasecmp(k, "nodmraid") ||
                        !strcasecmp(k, "xdriver") ||
+                       !strcasecmp(k, "nomodeset") ||
                        !strcasecmp(k, "syslog")) {
 
                 /* vnc implies graphical */
@@ -1175,7 +1178,12 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
                     flags |= LOADER_FLAGS_EARLY_NETWORKING;
                 }
 
-                checked_asprintf(&extraArgs[numExtraArgs],"--%s", k);
+                if (v != NULL) {
+                    checked_asprintf(&extraArgs[numExtraArgs], "--%s=%s", k, v)
+                } else {
+                    checked_asprintf(&extraArgs[numExtraArgs],"--%s", k);
+                }
+
                 numExtraArgs += 1;
 
                 if (numExtraArgs > (MAX_EXTRA_ARGS - 2)) {
-- 
1.7.1.1