summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2009-10-09 16:52:48 -0400
committerPeter Jones <pjones@redhat.com>2009-10-12 14:40:00 -0400
commit46aae7360fc76e7cc60742f62655fdc1e62efd80 (patch)
treebe25ad5f6cd301ed2889756eb901cac732588572
parent1991123cc472d68b8caf0246024b1db20f0fa826 (diff)
downloadanaconda-46aae7360fc76e7cc60742f62655fdc1e62efd80.tar.gz
anaconda-46aae7360fc76e7cc60742f62655fdc1e62efd80.tar.xz
anaconda-46aae7360fc76e7cc60742f62655fdc1e62efd80.zip
Add MultipathDevice.getDMNode(), because .updateSysfsPath() needs it.
This should have been part of the previous commit but wasn't.
-rw-r--r--storage/devices.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/devices.py b/storage/devices.py
index 2af2dc70a..577b0e9b4 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2820,6 +2820,14 @@ class MultipathDevice(DiskDevice):
else:
self.sysfsPath = ''
+ def getDMNode(self):
+ """ Return the dm-X (eg: dm-0) device node for this device. """
+ log_method_call(self, self.name, status=self.status)
+ if not self.exists:
+ raise DeviceError("device has not been created", self.name)
+
+ return dm.dm_node_from_name(self.name)
+
class NoDevice(StorageDevice):
""" A nodev device for nodev filesystems like tmpfs. """
_type = "nodev"