summaryrefslogtreecommitdiffstats
path: root/storage/udev.py
diff options
context:
space:
mode:
authorJacek Danecki <Jacek.Danecki@intel.com>2009-06-22 18:46:44 +0200
committerHans de Goede <hdegoede@redhat.com>2009-06-22 18:46:44 +0200
commit9e4d2e76713c9c71dcdaf22767211c13be9b3668 (patch)
treec755ccbc9e2e603b640703216e9cccb5ff9a1caf /storage/udev.py
parentc88e9ea497d7fdc1487ab490305538d0a0dee3f0 (diff)
downloadanaconda-9e4d2e76713c9c71dcdaf22767211c13be9b3668.tar.gz
anaconda-9e4d2e76713c9c71dcdaf22767211c13be9b3668.tar.xz
anaconda-9e4d2e76713c9c71dcdaf22767211c13be9b3668.zip
Support for MD containers.
This patch adds new class MDRaidContainerDevice.
Diffstat (limited to 'storage/udev.py')
-rw-r--r--storage/udev.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/storage/udev.py b/storage/udev.py
index 63cc3fdf2..5c17a34c7 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -195,9 +195,14 @@ def udev_device_is_dm(info):
""" Return True if the device is a device-mapper device. """
return info.has_key("DM_NAME")
+def udev_device_is_md_container(info):
+ """ Return True if the device is a mdraid container device. """
+ return info.get("MD_LEVEL") == "container"
+
def udev_device_is_md(info):
- """ Return True is the device is an mdraid array device. """
- return info.has_key("MD_METADATA")
+ """ Return True if the device is a mdraid array device. """
+ return info.has_key("MD_DEVNAME") and \
+ info.has_key("MD_METADATA")
def udev_device_is_cdrom(info):
""" Return True if the device is an optical drive. """