* libparted/labels/dos.c (add_startend_metadata): Honor cylinder alignment flag. --- libparted/labels/dos.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c index ea8fc0b..581506e 100644 --- a/libparted/labels/dos.c +++ b/libparted/labels/dos.c @@ -2210,7 +2210,10 @@ add_startend_metadata (PedDisk* disk) else init_end = PED_MIN (dev->bios_geom.sectors - 1, init_end - 1); - if (!get_end_last_nonfree_part(disk, &final_start)) + DosDiskData *disk_specific = disk->disk_specific; + if (!disk_specific->cylinder_alignment) + final_start = dev->length - 1; + else if (!get_end_last_nonfree_part(disk, &final_start)) final_start = ped_round_down_to (dev->length, cyl_size); else final_start = PED_MAX (final_start + 1, -- 1.6.5.2 _______________________________________________ bug-parted mailing list bug-parted@gnu.org http://lists.gnu.org/mailman/listinfo/bug-parted