[PATCH 7/8] Properly identify dm devices even when udev info is incomplete.
David Lehman
dlehman at redhat.com
Tue Sep 16 16:41:10 UTC 2014
This will help us to ignore device-mapper devices that we can't use.
Resolves: rhbz#1080727
---
blivet/udev.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/blivet/udev.py b/blivet/udev.py
index 5755d0c..14bf50a 100644
--- a/blivet/udev.py
+++ b/blivet/udev.py
@@ -159,7 +159,8 @@ def device_get_label(udev_info):
def device_is_dm(info):
""" Return True if the device is a device-mapper device. """
- return 'DM_NAME' in info
+ dm_dir = "%s/dm" % device_get_sysfs_path(info)
+ return 'DM_NAME' in info or os.path.exists(dm_dir)
def device_is_md(info):
""" Return True if the device is a mdraid array device. """
--
1.9.3
More information about the anaconda-patches
mailing list