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

[PATCH 3/7] Remove check for MD_DEVNAME from udev_device_is_md. (#562024)



MD_DEVNAME is never set for existing md arrays. Some metadata versions
will have MD_NAME, but not all. All md arrays have MD_METADATA while
component devices do not, making it perfect for differentiating them.
---
 storage/udev.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/storage/udev.py b/storage/udev.py
index 4bef451..681cf24 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -151,8 +151,7 @@ def udev_device_is_dm(info):
 
 def udev_device_is_md(info):
     """ Return True if the device is a mdraid array device. """
-    return info.has_key("MD_DEVNAME") and \
-           info.has_key("MD_METADATA")
+    return info.has_key("MD_METADATA")
 
 def udev_device_is_cciss(info):
     """ Return True if the device is a CCISS device. """
-- 
1.6.2.5


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