[PATCH] Return None for next part type if all primary slots full. (#524859)

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

 



---
 storage/partitioning.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index 36cb861..8c171aa 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -451,12 +451,13 @@ def getNextPartitionType(disk, no_primary=None):
     if primary_count >= disk.maxPrimaryPartitionCount - 1:
         if extended and logical_count < max_logicals:
             part_type = parted.PARTITION_LOGICAL
-        elif not extended and supports_extended:
-            # last chance to create an extended partition
-            part_type = parted.PARTITION_EXTENDED
-        elif primary_count < disk.maxPrimaryPartitionCount and not no_primary:
-            # it's either a primary or nothing
-            part_type = parted.PARTITION_NORMAL
+        elif primary_count < disk.maxPrimaryPartitionCount:
+            if not extended and supports_extended:
+                # last chance to create an extended partition
+                part_type = parted.PARTITION_EXTENDED
+            elif not no_primary:
+                # it's either a primary or nothing
+                part_type = parted.PARTITION_NORMAL
     elif no_primary and extended and logical_count < max_logicals:
         # create a logical even though we could presumably create a
         # primary instead
-- 
1.6.0.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