[PATCH 2/4] 2 small mdraid related storage/udev.py changes

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

 



1) Make it safe to call udev_device_get_md_level on none md devices
2) Add udev_device_get_md_name() function
---
 storage/udev.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/storage/udev.py b/storage/udev.py
index 2d1561f..97a66da 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -293,7 +293,7 @@ def udev_device_get_minor(info):
     return int(info["MINOR"])
 
 def udev_device_get_md_level(info):
-    return info["MD_LEVEL"]
+    return info.get("MD_LEVEL")
 
 def udev_device_get_md_devices(info):
     return int(info["MD_DEVICES"])
@@ -304,6 +304,9 @@ def udev_device_get_md_uuid(info):
 def udev_device_get_md_container(info):
     return info.get("MD_CONTAINER")
 
+def udev_device_get_md_name(info):
+    return info.get("MD_NAME")
+
 def udev_device_get_vg_name(info):
     return info['LVM2_VG_NAME']
 
-- 
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