[PATCH 1/2] Latest dracut has new syntax for rd_DASD.

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

 



Upstream accepted my patch to change rd_DASD to specify a single device.
If multiple devices need to be brought up at boot time, just give
multiple rd_DASD arguments.  Syntax is (from dracut.8):

    rd_DASD=<CCW address>[,readonly=X][,use_diag=X][,erplog=X][,failfast=X]

The old rd_DASD has been renamed rd_DASD_MOD and is the same syntax as
the dasd kernel module parameter.  However, you can only specify a
single rd_DASD_MOD parameter at boot time.
---
 storage/devices.py |   28 +++++-----------------------
 1 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index e2cf91b..1d51962 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -3155,30 +3155,12 @@ class DASDDevice(DiskDevice):
         self.opts = kwargs.pop('opts')
         DiskDevice.__init__(self, device, **kwargs)
 
-    def dracutSetupString(self):
-        arg = "rd_DASD=%s" % (self.busid,)
-
-        # XXX: Temporary parameter until dracut gets a new rd_DASD option.
-        # Using the old dasd= kernel parameter syntax for now.  When dracut
-        # is fixed up, we can use these lines instead:
-        #
-        #for opt in self.opts.keys():
-        #    arg += ",%s=%s" % (opt, self.opts[opt],)
-
-        flags = []
-        for opt in self.opts.keys():
-            if self.opts[opt] == "1":
-                if opt == "readonly":
-                    flags.append("ro")
-                elif opt == "use_diag":
-                    flags.append("diag")
-                else:
-                    flags.append(opt)
+    def getOpts(self):
+        return map(lambda (k, v): "%s=%s" % (k, v,), self.opts.items())
 
-        if len(flags):
-            arg += "(" + ":".join(flags) + ")"
-
-        return arg
+    def dracutSetupString(self):
+        args = ["rd_DASD=%s" % (self.busid,)] + self.getOpts()
+        return ",".join(args)
 
 
 class NFSDevice(StorageDevice, NetworkStorageDevice):
-- 
1.6.5.2

_______________________________________________
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