diff options
author | David Lehman <dlehman@redhat.com> | 2010-02-22 14:35:41 -0600 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2010-02-22 17:09:27 -0600 |
commit | 4fe8719d80c595a92b99ee1e90af7ba5eee6d1e1 (patch) | |
tree | f03707be40c8106cd00058f0e6271b51abfce24d /storage/partitioning.py | |
parent | 8d44ae740c8774008b9c0411508f27bd37ff1c8f (diff) | |
download | anaconda-4fe8719d80c595a92b99ee1e90af7ba5eee6d1e1.tar.gz anaconda-4fe8719d80c595a92b99ee1e90af7ba5eee6d1e1.tar.xz anaconda-4fe8719d80c595a92b99ee1e90af7ba5eee6d1e1.zip |
Align extended partitions like we do other partitions.
Diffstat (limited to 'storage/partitioning.py')
-rw-r--r-- | storage/partitioning.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py index 87154ee32..70cd75d77 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, |