From 409f46b1d09059bb587c27a19e978b3656057206 Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Wed, 5 Nov 2008 20:18:52 +0000 Subject: [PATCH] Added exclusion to the partition copy primary paste unallocated extended problem because primary partitions at the start of the disk do not experience this problem. svn path=/trunk/; revision=954 --- ChangeLog | 5 ++++- src/Dialog_Partition_Copy.cc | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c4a8550..95838de7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,11 @@ * src/Dialog_Partition_Copy.cc: Fixed copy and paste partition problem. - Adjust for situation when an MSDOS partition table is in - use and a primary partition is copied and pasted into + use and a primary partition is copied and pasted into an unallocated space in an extended partition. + - Added exclusion for primary partitions at the start of the disk + since this problem does not occur because the size of the master + boot record equals the size of the extended boot record. - Closes GParted bug #556058 2008-11-04 Curtis Gedak diff --git a/src/Dialog_Partition_Copy.cc b/src/Dialog_Partition_Copy.cc index 76d3cdbb..cc50b004 100644 --- a/src/Dialog_Partition_Copy.cc +++ b/src/Dialog_Partition_Copy.cc @@ -54,8 +54,12 @@ void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, cons // additional 8 MB. 8 MB is typical cylinder size with // todays larger disks. // 8 MB = (255 heads) * (63 sectors) * (512 bytes) - //FIXME: Should confirm MSDOS partition table type, and use cylinder size from device + // NOTE: This problem does not occur for a primary partition + // at the the start of the disk because the size of the EBR and + // Master Boot Record are the same. + //FIXME: Should confirm MSDOS partition table type, track sector size, and use cylinder size from device if ( copied_partition .type == TYPE_PRIMARY + && copied_partition .sector_start != 63 && selected_partition .type == TYPE_UNALLOCATED && selected_partition .inside_extended )