[PATCH 6/7] Add udev_device_is_dasd() to detect DASD devices.

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

 



The only thing I can tell is available for us from the udev db is to see
if the DEVNAME starts with 'dasd'.  We'll need this for the dracut
changes for DASD later.
---
 storage/udev.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/storage/udev.py b/storage/udev.py
index 2c41343..d051157 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -157,6 +157,14 @@ def udev_device_is_md(info):
     return info.has_key("MD_DEVNAME") and \
            info.has_key("MD_METADATA")
 
+def udev_device_is_dasd(info):
+    """ Return True if the device is a dasd device. """
+    devname = info.get("DEVNAME")
+    if devname:
+        return devname.startswith("dasd")
+    else:
+        return False
+
 def udev_device_is_cdrom(info):
     """ Return True if the device is an optical drive. """
     # FIXME: how can we differentiate USB drives from CD-ROM drives?
-- 
1.6.2.5

_______________________________________________
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