Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Java (http://www.linux-archive.org/debian-java/)
-   -   Align extended partitions like we do other partitions. (http://www.linux-archive.org/debian-java/330343-align-extended-partitions-like-we-do-other-partitions.html)

David Lehman 02-22-2010 07:42 PM

Align extended partitions like we do other partitions.
 
---
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 11:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.