diff options
author | Peter Jones <pjones@redhat.com> | 2009-10-09 16:52:48 -0400 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2009-10-12 14:40:00 -0400 |
commit | 46aae7360fc76e7cc60742f62655fdc1e62efd80 (patch) | |
tree | be25ad5f6cd301ed2889756eb901cac732588572 | |
parent | 1991123cc472d68b8caf0246024b1db20f0fa826 (diff) | |
download | anaconda-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.py | 8 |
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" |