[PATCH 1/2] Align extended partitions like we do other partitions.

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

 



---
 storage/partitioning.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index 87154ee..70cd75d 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -689,13 +689,15 @@ def addPartition(disklabel, free, part_type, size):
 
     if part_type == parted.PARTITION_EXTENDED:
         end = free.end
+        length = end - start + 1
     else:
         # size is in MB
         length = sizeToSectors(size, disklabel.partedDevice.sectorSize)
         end = start + length - 1
-        if not disklabel.endAlignment.isAligned(free, end):
-            end = disklabel.endAlignment.alignNearest(free, end)
-            log.debug("adjusted length from %d to %d" % (length, end - start + 1))
+
+    if not disklabel.endAlignment.isAligned(free, end):
+        end = disklabel.endAlignment.alignNearest(free, end)
+        log.debug("adjusted length from %d to %d" % (length, end - start + 1))
 
     new_geom = parted.Geometry(device=disklabel.partedDevice,
                                start=start,
-- 
1.6.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