[PATCH 3/3] Carry rdloaddriver= parameters through to the boot loader config.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Handle multiple rdloaddriver= parameters in the cmdlineDict.  In cases
where we already have a key, convert the value to a set and add the new
value to it.  Start new keys with just the value.

In the boot loader code, take cmdlineDict values that are sets, convert
them to lists, and join them to a single string separated by commas
before writing them to the argument list.

Related: rhbz#689029
---
 booty/bootloaderInfo.py |    7 +++++--
 flags.py                |   14 +++++++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index 3e17d7c..64e7ce1 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -163,7 +163,7 @@ class KernelArguments:
         # look for kernel arguments we know should be preserved and add them
         ourargs = ["speakup_synth", "apic", "noapic", "apm", "ide", "noht",
                    "acpi", "video", "pci", "nodmraid", "nompath", "nomodeset",
-                   "noiswmd", "fips"]
+                   "noiswmd", "fips", "rdloaddriver"]
 
         if iutil.isS390():
             ourargs.append("cio_ignore")
@@ -174,7 +174,10 @@ class KernelArguments:
 
             val = flags.cmdline.get(arg, "")
             if val:
-                newArgs.append("%s=%s" % (arg, val))
+                if type(val) == type(set()):
+                    newArgs.append("%s=%s" % (arg, ','.join(list(val)),))
+                else:
+                    newArgs.append("%s=%s" % (arg, val,))
             else:
                 newArgs.append(arg)
 
diff --git a/flags.py b/flags.py
index e01ec63..afb56e2 100644
--- a/flags.py
+++ b/flags.py
@@ -61,7 +61,19 @@ class Flags:
                 key = i
                 val = None
 
-            cmdlineDict[key] = val
+            if key.lower() == "rdloaddriver":
+                key = key.lower()
+
+            if cmdlineDict.has_key(key):
+                if type(cmdlineDict[key]) == type(set()):
+                    cmdlineDict[key].add(val)
+                else:
+                    tmpset = set()
+                    tmpset.add(cmdlineDict[key])
+                    tmpset.add(val)
+                    cmdlineDict[key] = tmpset
+            else:
+                cmdlineDict[key] = val
 
         return cmdlineDict
 
-- 
1.7.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux