gparted/include
Mike Fleetwood 75131d85a5 Fix snap-to-alignment of operations creating partitions (#779339)
Using the default MiB alignment, creating an MSDOS logical partition
between two other existing logical partitions fails with this error
dialog:

    (-) <b>An error occurred while applying the operations</b>
        See the details for more information.
        <b>IMPORTANT</b>
        If you want support, you need to provide the saved details!
        See http://gparted.org/save-details.htm for more information.
                                                               [ OK ]

and these operation details:

    + libparted messages
      - Unable to satisfy all constraints on the partition.

This bug was introduced by this commit included in GParted 0.23.0:
    90e3ed68fc
    Shallow copy Device object into Operation object (#750168)

The commit message claimed that the deep copied Partition objects inside
the Device inside the Operation object are never accessed.  This turned
out not to be true.  Win_GParted::Add_Operation() uses them as part of
snap_to_alignment() which updates requested partition boundaries to
account for alignment requirements and the space needed for EBR
(Extended Boot Record) preceding logical partitions.

In this case the new logical partition was trying to be created over the
top of the EBR for the following logical partition because
snap_to_alignment() wasn't aware of its existence.

Fix by making Add_Operation() and snap_to_alignment() refer to the
current device, as displayed in the UI, rather than the shallow copy
included in the Operation object.  Hopefully now it is true that the
not copied vector of Partition objects in the Device object in each
Operation object are never accessed.

Bug 779339 - enforce at least 1 MiB "free space following"
2017-04-23 08:57:25 -06:00
..
.cvsignore added *.swp some modifications to pass 'make distcheck' minor cleanups 2005-11-25 12:59:47 +00:00
BlockSpecial.h Pre-populate BlockSpecial cache while reading /proc/partitions (#767842) 2016-08-06 09:47:58 -06:00
CopyBlocks.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DMRaid.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Device.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DialogFeatures.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DialogManageFlags.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Base_Partition.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Disklabel.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_FileSystem_Label.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Partition_Copy.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Partition_Info.h Provide virtual Partition::get_filesystem_partition() method (#774818) 2017-01-14 08:49:58 -07:00
Dialog_Partition_Name.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Partition_New.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Partition_Resize_Move.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Progress.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Rescue_Data.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DrawingAreaVisualDisk.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
FS_Info.h Ensure blkid FS_Info cache has entries for all whole disk devices (#771244) 2017-01-06 12:21:50 -07:00
FileSystem.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
Frame_Resizer_Base.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Frame_Resizer_Extended.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
GParted_Core.h Implement maximize encryption volume as part of check repair operation (#774818) 2017-01-14 08:49:58 -07:00
HBoxOperations.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
LUKS_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
LVM2_PV_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Makefile.am Rename file and class to CopyBlocks (#775932) 2016-12-12 13:15:34 -07:00
Mount_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Operation.h Create and use general find_extended_partition() function 2017-01-14 08:49:58 -07:00
OperationChangeUUID.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCheck.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCopy.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCreate.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationDelete.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationDetail.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationFormat.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationLabelFileSystem.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationNamePartition.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationResizeMove.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Partition.h Remove unused clear_mountpoints parameter from add_mountpoint*() 2017-01-14 08:49:58 -07:00
PartitionLUKS.h Preview resize/move operation of encrypted file systems (#774818) 2017-01-14 08:49:58 -07:00
PartitionVector.h Create and use general find_extended_partition() function 2017-01-14 08:49:58 -07:00
PipeCapture.h Prevent cross thread write after free in _OnReadable() (#731752) 2014-07-06 10:22:40 -06:00
Proc_Partitions_Info.h Switch to a static interface for Proc_Partitions_Info 2016-08-06 09:47:58 -06:00
ProgressBar.h Write a generic progress bar class (#760709) 2016-02-12 09:09:56 -07:00
SWRaid_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
TreeView_Detail.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Utils.h Extend functions generating encrypted file system string (#774818) 2017-01-14 08:49:58 -07:00
Win_GParted.h Fix snap-to-alignment of operations creating partitions (#779339) 2017-04-23 08:57:25 -06:00
btrfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
exfat.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
ext2.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
f2fs.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
fat16.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
hfs.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
hfsplus.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
i18n.h Make include guards unique (#539297) 2013-06-05 10:57:39 -06:00
jfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
linux_swap.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
luks.h Implement resize/move operation of encrypted file systems (#774818) 2017-01-14 08:49:58 -07:00
lvm2_pv.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
nilfs2.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
ntfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
reiser4.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
reiserfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
ufs.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
xfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00