[rhel6-branch 4/4] Fix PartitionDevice.path to work with device-mapper disks.

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

 



From: David Lehman <dlehman@xxxxxxxxxx>

cherry-pick of 54feaeabf579fbf5b8ec5b1c85509b0a0a1e22ba

Related: rhbz#731973
---
 storage/devices.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 72d6c61..87d0699 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1105,13 +1105,12 @@ class PartitionDevice(StorageDevice):
 
     @property
     def path(self):
-        """ Device node representing this device. """
         if not self.parents:
-            # Bogus, but code in various places compares devices by path
-            # So we must return something unique
-            return self.name
+            devDir = StorageDevice._devDir
+        else:
+            devDir = self.parents[0]._devDir
 
-        return "%s/%s" % (self.parents[0]._devDir, self.name)
+        return "%s/%s" % (devDir, self.name)
 
     @property
     def partType(self):
-- 
1.7.6

_______________________________________________
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