This is the first step of adding support for just LVM2 Phyiscal Volumes,
a subset of full LVM2 support.
Make it clear that it is only LVM2 PVs being treated like a file system.
Bug #160787 - lvm support
Some classes contained private attributes which were used only by a single
member function. Such items were moved to the corresponding function implementations
to stress their limited usage scope.
A few unused variables were also deleted.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
The release of (lib)parted 3.0 includes a change to the Application
Programing Interface - API. Most importantly, libparted 3.0 removes
many file system specific function calls, and hence the capabilities
provided by these functions. In order for GParted to compile and link
with libparted 3.0, this libparted functionality is lost.
Specifically, the functionality that is lost when GParted is compiled
and linked with libparted 3.0 is as follows:
- Loss of ability to grow and shrink FAT16 and FAT32 file systems
- Loss of ability to shrink HFS and HFS+ file systems
- Loss of ability to determine used and unused sectors in HFS and
HFS+ file systems
- Loss of ability to erase file system signatures on partition
create and format
It is hoped that other free software projects will include some or all
of the above lost functionality, which can then be added back to
GParted.
This commit includes a change in how FAT16 and FAT32 file systems are
moved. Specifically the move is now performed internally by GParted
when linked with libparted 3.0. The move functionality is provided by
libparted for prior libparted versions (e.g. less than 3.0).
This is the final enhancement in a series of commits that enable
GParted to compile with libparted version 3.0.
Closes Bug #651559 - Doesn't compile against parted 3.0
Prior to this enhancement creating a new partition aligned to MiB
after a partition aligned to cylinder would result in the creation of
a partition that was 1 MiB smaller in size than requested. In the
case of a 1 MiB new partition, a warning message would be displayed
indicating that "A partition cannot have a length of 0 sectors".
This problem is avoided by applying similar logic as was used to
address the following bug:
Bug #626946 - Destination partition smaller than source partition
Quote from GNOME Human Interface Guidelines 2.2.1 on Drop-down lists:
"Selecting an item from a drop-down list should not affect the
values of any other controls. It may sensitize, insensitize, hide
or show other controls, however."
Make align to MiB the default setting instead of align to cylinder.
Migrate logic for alignment to cylinder into its own method
snap_to_cylinder, and place common logic in snap_to_alignment.
Add alignment checks for situations where space is needed for Master
Boot Record or Extended Boot Record.
Adjust ranges on spin buttons according to required boot record space.
Copy fix for off by one sector (#596552) from
Dialog_Partition_New::Get_New_Partition to
Dialog_Base_Partition::Get_New_Partition
Enhance resize / move logic for checking locations of nearby logical
partitions to not depend on the partition ordering.
Note: This commit does not include limiting graphic movement according
to required boot record space.
Also add signal handler to alignment menu to update file system
minimum size.
This enhancement is to prepare for adding a third alignment
option to align to MiB.
With the removal of the 512 byte constants, such as MEBIBYTE, it
was possible to rename the _FACTOR constants back to BYTE
constants. The _FACTOR constants, such as MEBI_FACTOR, were a
temporary measure to help in the transition to support devices
with sector sizes > 512 bytes.
According to parted documentation, only "msdos" and "dvh" disk
types (or partition table types) support extended partitions.
All other disk types support primary partitions only.
Restore copyright entries by original author to those of his last
known repository commit titled "released gparted-0.3.4 on
LarryT's request." on Feb 25, 2007.
Add my own copyright entries for files in which I changed source
code. Files in which I only made spelling changes do not have my
copyright entry added.
* include/Frame_Resizer_Base.h,
include/Frame_Resizer_Extended.h,
src/Dialog_Base_Partition.cc,
src/Dialog_Partition_Copy.cc,
src/Dialog_Partition_New.cc,
src/Dialog_Partition_Resize_Move.cc,
src/Frame_Resizer_Base.cc,
src/Frame_Resizer_Extended.cc: did lots of work on the resizer, it's
behaviour should be more natural and satisfying now. (see also
#331591)
* src/Win_GParted.cc: extended partition was resizable even when it's
busy. fixed.
* src/ntfs.cc: made scan output more readable.
* src/FrameVisualDisk.cc: added FIXME
* in some places i still used MiB's instead of sectors to store sizes.
this has been fixed everywhere. Only the spinbuttons still use
MiB's. I have a few ideas on how to solve this, but i'll take it up
with #usability first.
* implemented Utils::sector_to_unit() and use it in several places
* (finally) fixed errors with ntfsresizing (had a lot to do with
difference between MB and MiB)
* resizing of reiserfs now shows more detailed feedback
* support for TebiByte (TiB) unit
* replaced the inline Utils functions with static functions.
This shaves a few kbytes (24 in fact) off the binary and is a bit
cleaner code-wise (imho).
* include/Partition.h,
src/Partition.cc: from now on each partition has a reference to it's
device.
* src/Win_GParted.cc,
src/Dialog_Partition_New.cc: make use of new Set() from partition
* include/GParted_Core.h,
src/GParted_Core.cc: since ped_file_system_clobber() ignored reiser4
i've implemented a custom 'filesystem signature remover'.
Also made use of the fact a partition now knows on which device it
lives.
* src/Operation.cc: the get_string() didn't use
Get_Filesystem_String() and thus returned faulty strings. Also did
some cleanups.
* hmmz, lots of shimmery internals..
Instead of using a boolean to indicate support for certain
features i now use and enum (NONE, LIBPARTED, EXTENDED).
This allowed me to clean up some stuff that annoyed me ;)
Still.. the core could use a bit more love...
* src/GParted_Core.cc: removed sleep( 1 ). This isn't needed anymore now the layout is scanned before the re-readtest. (saves seconds at scantime :) )
* replaced C-style typeconversion with static_casts throughout the project.
* added MIN and MAX to filesystemstruct to set min. and max sizes of a filesystem. So instead of checking per filesystem
i now simply check the fs.MIN or fs.MAX. this results in less and cleaner code. Also this will come in handy when adding
support for new filesystems. (This also fixed several minor bugs with filesystemsizes and gained some improvement in resizer
performance)