[PATCH 2/6] New iswmd parameter for kernel cmdline

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

 



This patch add support for new iswmd parameter passed to the kernel command line.

When this parameter is added to the command line it will change support for isw_raid_member format:
- isw_raid_member is removed from udevTypes for DMRAIDMember
- isw_raid_member is added to udevTypes for MDRAIDMember
- md_uuid will be read from udev database
commit b1bf0816119da3a2932c59c3cde97e782a609e63
Author: Jacek Danecki <Jacek.Danecki@xxxxxxxxx>
Date:   Fri Apr 10 13:45:30 2009 -0400

    New iswmd parameter for kernel cmdline

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 8c41c50..3f2ec18 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -30,6 +30,7 @@ from deviceaction import *
 import formats
 from udev import *
 from iutil import log_method_call
+from flags import flags
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
@@ -1429,7 +1430,8 @@ class DeviceTree(object):
         if format_type == "crypto_LUKS":
             # luks/dmcrypt
             kwargs["name"] = "luks-%s" % uuid
-        elif format_type == "linux_raid_member":
+        elif format_type == "linux_raid_member" or \
+            (format_type == "isw_raid_member" and flags.cmdline.has_key("iswmd")):
             # mdraid
             try:
                 kwargs["mdUuid"] = udev_device_get_md_uuid(info)
diff --git a/storage/formats/dmraid.py b/storage/formats/dmraid.py
index 4ebd41c..fdbe14b 100644
--- a/storage/formats/dmraid.py
+++ b/storage/formats/dmraid.py
@@ -21,6 +21,7 @@
 #
 
 from iutil import log_method_call
+from flags import flags
 from ..errors import *
 from . import DeviceFormat, register_device_format
 
@@ -93,5 +94,9 @@ class DMRaidMember(DeviceFormat):
                         type=self.type, status=self.status)
         raise DMRaidMemberError("destruction of dmraid members is non-sense")
 
+
+if flags.cmdline.has_key("iswmd"):
+    DMRaidMember._udevTypes.remove("isw_raid_member")
+
 register_device_format(DMRaidMember)
 
diff --git a/storage/formats/mdraid.py b/storage/formats/mdraid.py
index ec1a617..fb4569c 100644
--- a/storage/formats/mdraid.py
+++ b/storage/formats/mdraid.py
@@ -23,6 +23,7 @@
 import os
 
 from iutil import log_method_call
+from flags import flags
 from parted import PARTITION_RAID
 from ..errors import *
 from ..devicelibs import mdraid
@@ -92,6 +93,8 @@ class MDRaidMember(DeviceFormat):
         # XXX hack -- we don't have a nice way to see if the array is active
         return False
 
+if flags.cmdline.has_key("iswmd"):
+    MDRaidMember._udevTypes.append("isw_raid_member")
 
 register_device_format(MDRaidMember)
 
_______________________________________________
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