[PATCH 2/3] Make partitioned attr depend on whether the device is partitionable.

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

 



This way lvm lvs containing a disklabel will not be treated like disks.
---
 storage/__init__.py |    3 +++
 storage/devices.py  |    3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index eb4d69f..26481f3 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -410,6 +410,9 @@ class Storage(object):
 
             Ignored devices are not included, nor disks with no media present.
 
+            Devices of types for which partitioning is not supported are also
+            not included.
+
             This is based on the current state of the device tree and
             does not necessarily reflect the actual on-disk state of the
             system's disks.
diff --git a/storage/devices.py b/storage/devices.py
index d5a43a3..cb68456 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -734,7 +734,8 @@ class StorageDevice(Device):
 
     @property
     def partitioned(self):
-        return self.format.type == "disklabel"
+        return self.format.type == "disklabel" and self.partitionable
+
 
 class DiskDevice(StorageDevice):
     """ A disk """
-- 
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