[PATCH 2/4] Hide biosraid member devices that contain MDRaidMember formats.

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

 



This brings the behavior in line with other (dmraid) biosraid members.
---
 storage/devicetree.py     |    7 ++++++-
 storage/formats/mdraid.py |    5 +++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 1a981f2..ff8c168 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1569,6 +1569,10 @@ class DeviceTree(object):
         name = udev_device_get_name(info)
         sysfs_path = udev_device_get_sysfs_path(info)
 
+        if udev_device_is_biosraid(info):
+            # this will prevent display of the member devices in the UI
+            device.format.biosraid = True
+
         md_array = self.getDeviceByUuid(device.format.mdUuid)
         if device.format.mdUuid and md_array:
             md_array._addDevice(device)
@@ -1710,7 +1714,8 @@ class DeviceTree(object):
         # Now, if the device is a disk, see if there is a usable disklabel.
         # If not, see if the user would like to create one.
         format = getFormat(format_type)
-        if device.partitionable and not format.hidden:
+        if device.partitionable and not \
+           (format.hidden or udev_device_is_biosraid(info)):
             self.handleUdevDiskLabelFormat(info, device)
             if device.partitioned or self.isIgnored(info):
                 # If the device has a disklabel, or the user chose not to
diff --git a/storage/formats/mdraid.py b/storage/formats/mdraid.py
index 17b01bb..9983da4 100644
--- a/storage/formats/mdraid.py
+++ b/storage/formats/mdraid.py
@@ -64,6 +64,7 @@ class MDRaidMember(DeviceFormat):
         self.raidMinor = None
 
         #self.probe()
+        self.biosraid = False
 
     def probe(self):
         """ Probe for any missing information about this format. """
@@ -93,6 +94,10 @@ class MDRaidMember(DeviceFormat):
         # XXX hack -- we don't have a nice way to see if the array is active
         return False
 
+    @property
+    def hidden(self):
+        return (self._hidden or self.biosraid)
+
     def writeKS(self, f):
         f.write("raid.%s" % self.mdUuid)
 
-- 
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