Revision c631f3e4 image_creator/bundle_volume.py
b/image_creator/bundle_volume.py | ||
---|---|---|
222 | 222 |
# Align to 2048 |
223 | 223 |
part_end = ((part_end + 2047) // 2048) * 2048 |
224 | 224 |
|
225 |
# Make sure the partition starts where the old partition started. |
|
226 |
constraint = parted.Constraint(device=image_disk.device) |
|
227 |
constraint.startRange = parted.Geometry(device=image_disk.device, |
|
228 |
start=last.start, length=1) |
|
229 |
|
|
225 | 230 |
image_disk.setPartitionGeometry( |
226 |
image_disk.getPartitionBySector(last.start), |
|
227 |
parted.Constraint(device=image_disk.device), |
|
231 |
image_disk.getPartitionBySector(last.start), constraint, |
|
228 | 232 |
start=last.start, end=part_end) |
229 | 233 |
image_disk.commitToDevice() |
230 | 234 |
|
Also available in: Unified diff