Commit Graph

905 Commits

Author SHA1 Message Date
Mike Fleetwood 7ba1d417c5 Add labelling of btrfs file systems
Use "btrfs filesystem label" command to set the label of unmounted
btrfs file systems.
2011-11-13 09:29:45 -07:00
Stephen Kirkby e247357b51 Reverse umounting order in xfs::copy
See bug #663806 - Cannot copy XFS filesystem to new smaller
                  partition anymore
2011-11-13 09:24:01 -07:00
Curtis Gedak 38aab666b4 Enable copy to smaller XFS partition (#663806)
Closes Bug #663806 - Cannot copy XFS filesystem to new smaller
                     partition anymore
2011-11-11 11:52:49 -07:00
Curtis Gedak 32659e5e02 Add xfsdump package requirement to copy xfs file systems 2011-11-10 13:12:21 -07:00
Mike Fleetwood cbd3170e57 Fix btrfs volume label reading
There are still 2 issues with reading btrfs labels when falling back
on using btrfs-show command, rather than primary method of using the
blkid command:

1)  Label is set no "none" when btrfs-show is reporting there is no
    label, although it is impossible to distinguish from the case of the
    label actually being set to "none".

2)  The label has 2 trailing spaces appended as the regular expression
    matches "Label: (btrfslabel  )uuid:" rather than
    "Label: (btrfslabel)  uuid:" in the btrfs-show output.

Assume a label "none" means there is no label and fix the regular
expression.
2011-11-08 08:54:25 -07:00
Curtis Gedak 370c084947 Improve code comments for reading volume labels 2011-11-01 13:13:28 -06:00
Curtis Gedak b6f1c56fb1 Enhance regexp_label method to handle unicode characters
Prompted by Bug #662537 - Ext4 unicode labels not shown correctly
2011-11-01 13:08:36 -06:00
Curtis Gedak 2ae36153ee Display ntfs unicode volume labels properly
Prompted by Bug #662537 - Ext4 unicode labels not shown correctly
2011-11-01 13:05:42 -06:00
Curtis Gedak cf8293cf78 Display ext2/3/4 unicode volume labels properly (#662537)
Note that this enhancement changes GParted to first try the native
tools to determine the volume label for all file systems.  If the
volume label is not found then the fall back method is to use blkid.

There is a small degradation in device refresh times as a result of
this change.

Closes Bug #662537 - Ext4 unicode labels not shown correctly
2011-11-01 13:01:02 -06:00
Curtis Gedak 71c1606cac Repair broken volume label regular expression pattern
Also adjust indentation.
2011-11-01 12:45:14 -06:00
Curtis Gedak 47e0c00a7e Handle additional return codes from btrfsctl resizing
Sometimes btrfsctl returns 256 on successful resize, not just 0.
2011-10-25 11:52:10 -06:00
Curtis Gedak 284cfa7ed9 Add missing exfat file system to set_proper_filesystem method
This should have been part of commit
7cbc125a2e
2011-10-22 14:40:08 -06:00
Curtis Gedak 7cbc125a2e Add detection of exfat file systems (#639760)
Note that util-linux v2.18 or higher is required to detect exfat file
systems.

Part of Bug #639760 - exfat / fat64 support
2011-10-22 11:54:54 -06:00
Curtis Gedak 2bcd5d2954 Cleanup btrfs code
Move btrfs higher up the file system list.
Remove btrfs skip references as btrfs is now supported.
2011-10-22 10:44:29 -06:00
Curtis Gedak ee9f9724e8 Add ability to resize btrfs file systems (#661715)
Closes Bug #661715 - use btrfs-tools ability to resize btrfs
                     partitions
2011-10-20 14:37:38 -06:00
Curtis Gedak 9b004634ab Fix innocuous bug
Fix bug introduced in GParted 0.9.0 in commit
4a8fef9822 to address ISO C++ ambiguity
compiler warning.

Due to the nature of the surrounding code, this bug was not evident
in the log file output.

Thanks to Magnus Fromreide for finding this bug.
2011-10-18 10:25:37 -06:00
Jérôme Dumesnil 03cdaed946 Improve Merge_Operations method parameters and checks 2011-10-13 11:26:16 -06:00
Jérôme Dumesnil b10349ae37 Merge overlapping operations (#438573)
When a new operation is added to operations list, check if a merge
is possible depending on the operation type:

    OPERATION_RESIZE_MOVE:  2 consecutive "resize" operations on the
                            same  partition
OPERATION_LABEL_PARTITION:  2 "label change" operations (need not be
                            consecutive) on the same partition
          OPERATION_CHECK:  2 "check" operations (need not be
                            consecutive) on the same partition
         OPERATION_FORMAT:  2 consecutive "format" operations on the
                            same partition

Closes Bug #438573 - Cancel out overlapping actions

Also fix a bug when copying partition using the Partition::Set(...)
method.  This method did not initialize "sectors_used" and
"sectors_unused" members.
2011-10-05 15:08:44 -06:00
Curtis Gedak bbd09a6321 Fix NTFS resize operation fails (#655215)
Due to a change in error handling behaviour in ntfsresize version
2.011.4.12AR.4 (libntfs-3g) GParted would fail to properly resize ntfs
file systems if the file system was marked for consistency check.

The current maintainer of ntfsprogs provided the following advice:

     "Well, though I am reverting back to the old behavior, you should
     add -ff instead of relying on an unspecified behavior when
     ntfsresize gets an error when trying to read the reply. I suppose
     you do not connect the stdin of ntfsresize, hence the error. With
     -ff no question is asked (I stress : even with the old
     ntfsresize)."

Hence I have added a second "--force" option to the ntfsresize command
for resizing NTFS file systems.

Closes Bug #655215 - NTFS partition resize fails
2011-09-13 11:20:50 -06:00
Tiffany Antopolski 3b87931e87 Dialog_Rescue_Data.cc: fixed type, director --> directory
This fixes bug# 657744
2011-08-31 10:14:01 -06:00
Curtis Gedak 4a8fef9822 Fix ISO C++ ambiguity compiler warning
Enhance code to pass compiler warning.  Prior to this change the
compiler would complain with the following message:

error: ISO C++ says that these are ambiguous, even though the worst
conversion for the first is better than the worst conversion for the
second: /usr/include/c++/4.5/bits/postypes.h:192:7: note: candidate 1:
std::fpos<_StateT> std::fpos<_StateT>::operator-(std::streamoff) const
[with _StateT = __mbstate_t, std::fpos<_StateT> =
std::fpos<__mbstate_t>, std::streamoff = long int] Utils.cc:443:27:
note: candidate 2: operator-(std::streamoff, long long int) <built-in>
2011-07-18 13:31:54 -06:00
Curtis Gedak f768cbd1b4 Fix ignoring return value compiler warnings
Add code to handle situation where realpath might return a NULL value.
Prior to this change the compiler would complain with the following
message:

error: ignoring return value of ‘char* realpath(const char*, char*)’,
declared with attribute warn_unused_result
2011-07-18 13:31:54 -06:00
Curtis Gedak 6c9d0cf6f1 Fix expression always true compiler warning
Removed expression that is always true.  Prior to this change the
compiler would complain with the following message:

error: comparison of unsigned expression >= 0 is always true
2011-07-18 13:31:54 -06:00
Curtis Gedak 55b71a77bc Fix unused parameter compiler warning
Removed unused parameter.  Prior to this change the compiler would
complain with the following message:

error: unused parameter ‘cylinder_size’
2011-07-18 13:31:54 -06:00
Curtis Gedak 026d0bd34b Fix ignoring return value compiler warning
Add code to handle situation where mkdtemp(char*) function returns
with a NULL value.  Prior to this code the compiler would complain
with the following message:

error: ignoring return value of ‘char* mkdtemp(char*)’, declared with
attribute warn_unused_result
2011-07-18 13:31:54 -06:00
Curtis Gedak 813010b148 Update AUTHORS file and minor variable rename
Add recognition for the work done by Markus Elfring.
Also minor variable rename and added comment for patch to bug #634090.
2011-07-18 13:28:49 -06:00
Markus Elfring 91b971691d Bug #634090: Change some attributes to local variables
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>
2011-07-18 13:28:49 -06:00
Curtis Gedak 8a58b5b53e Enable compile and link with libparted 3.0 (#651559)
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
2011-06-09 09:59:41 -06:00
Curtis Gedak 53b2b50f4a Fix size off by one sector with unrecognized disk label (#649444)
On disks with an unrecognized disk label, the end sector value
was saved as one sector larger than actual.  This caused the
Partition Information dialog to report the end sector value and
the total number of sectors on the disk as one larger than the
actual value.

Closes Bug #649444 - Partition information reports wrong sector
                     count
2011-05-31 09:45:18 -06:00
Curtis Gedak f188974a6c Improve English grammar: amount -> number (#650237)
Closes Bug #650237 - Grammar error: amount -> number
2011-05-24 11:53:08 -06:00
Gabor Kelemen cdbede1727 Typo: "on on" -> on 2011-05-24 11:03:31 -06:00
Seth Heeren 82fcb1ef0b Simplified cleanup_cursor() implementation
I hit this performance bug when I cloneda 40G NTFS partition. The actual
copy was done in under 11 minutes. After that I was shocked to find that
gparted would spend over 12 minutes in cleanup_cursor, pegging a CPU
core. (On a quad core desktop...)

Simply replacing the ustring with std::string would reduce the time to
about 1.5 minutes. Still bad. Also, I didn't want to lose UTF8
awareness.

So I rewrote the algorithm in 'streaming mode'. This has the (potential)
drawback that locale conversions are done, but performs well and
- IMHO - is a lot more readable.

On a minor note: this implementation correctly handles backspaces at the
start of a line.
2011-03-27 10:37:08 -06:00
Curtis Gedak ba28423e76 Remove one level of quoting when spawning commands
Change spawn_command_line_sync to spawn_sync to reduce the level of
quoting required when passing commands to the function.  Since
spawn_command_line_sync uses the parent's environment, the replacement
call also uses the parent's environment.

This change permits unmounting of file systems mounted with an
apostrophe in the mount point name.

Ubuntu launchpad bug 151796 - Can't unmount partition with apostrophe
                              in label
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/151796
2011-03-19 11:25:04 -06:00
Curtis Gedak 87acba030c Remove all usage of kpartx to avoid partition entry duplicates
Usage of the kpartx package to create partition names has been
completely removed.  Hence kpartx is no longer even an optionally used
package by gparted.

This change is related to the following bug report:

Ubuntu launchpad bug 719129 - [Natty] Gparted duplicates dmraid
                              partition devices
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/719129
2011-02-22 14:40:02 -07:00
Curtis Gedak 2f99511228 Add flag --enable-libparted-dmraid to use native libparted dmraid
The new configure option --enable-libparted-dmraid enables the native
use of /dev/mapper dmraid support in the libparted library.

If this option is not specified, or is disabled, then gparted code
will be used to support dmraid.  The gparted code uses the old dmraid
partition naming scheme of always appending the partition number to
the device name.  The letter 'p' is not inserted between the device
name and the partition number.  The gparted code is particularly
useful when used with older versions of libparted that do not support
/dev/mapper dmraid.

Ubuntu launchpad bug 719129 - [Natty] Gparted duplicates dmraid
                              partition devices
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/719129
2011-02-22 13:22:49 -07:00
Joan Lledó ef37bdb7de Added support to lost data recovery using gpart 2011-01-29 14:58:02 -07:00
Curtis Gedak ec876448b4 Prevent visual disk display area from disappearing
Added a display refresh to the event queue to address this
problem.

Previously, the display area of the visual disk seemed to
disappear when enough operations had been added to the queue so
that a scrollbar was required (about 4 operations).

If the three lines in HBoxOperations::load_operations method for
"//make scrollwindow focus on the last operation in the list"
were commented out then this also prevented the problem from
occurring.

Interestingly, if I changed the "set_cursor" method to
a "scroll_to_row" method, then this problem does not occur for an
additional 2 operations (about 6 operations total).

Ubuntu launchpad bug 583746 - Partition graph disappears after a
                              swap partition has been deleted
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/583746
2011-01-19 15:34:00 -07:00
Curtis Gedak 6395970e6b Increase robustness of help manual launch
Add direct invocation of yelp if normal open help manual methods
fail.
2011-01-17 09:28:09 -07:00
Curtis Gedak c299bbe9e2 Add possible cause for failure to read file system 2011-01-16 11:39:02 -07:00
Curtis Gedak 09848775f4 Add another reason to list when unable to detect file system 2011-01-16 11:15:35 -07:00
Curtis Gedak 340d506c04 Update copyright year 2011-01-16 10:45:25 -07:00
Curtis Gedak dd1db44639 Fix minor cylinder alignment rounding error (size < 1 cylinder)
Previously when creating a new partition on a device with 512
byte sectors with 7 MiB chosen and cylinder alignment, the
snap_to_cylinder logic would round up to 2 cylinders (~15.69
MiB), instead of the correct 1 cylinder (~7.84 MiB).
2011-01-15 14:46:18 -07:00
Curtis Gedak 6ae39268f2 Fix paste destination partition smaller than source (#639393)
Re-work logic for copying a cylinder aligned partition to a new
MiB aligned partition.  Previously this was partially fixed in
bug #626946 - Destination partition smaller than source partition

Closes Bug #639393 - Redux: Destination partition smaller than
                     source partition
2011-01-15 11:00:42 -07:00
Curtis Gedak b176a96e28 Enhance to work with mount points defined by uuid or label 2010-12-09 14:58:03 -07:00
Curtis Gedak 128b1439a1 Add methods to FS_Info class to get path by uuid and by label 2010-12-09 14:06:38 -07:00
Curtis Gedak 3973b6961d Handle characters like spaces in mount points (#629592)
Use mntent C library to read mount point files such as
/etc/fstab, /etc/mtab, and /proc/mounts.

Closes bug #629592 - Unable to find Mount Point if it contains a
                     Space Character
2010-12-09 13:59:33 -07:00
Curtis Gedak 3be3a39a68 Move dmraid device logic outside of for loop
Since this logic did not depend on the for loop variable, it does
not make sense to have this within the for loop.
2010-12-08 16:03:21 -07:00
Curtis Gedak fd77e73c46 Refactor device parsing logic into Proc_Partitions_Info class
The reason for refactoring is to simplify the large GParted_Core
class, to help minimize disk reads, and to group the logic for
processing the file /proc/partitions into a single logical class.
2010-12-07 16:01:54 -07:00
Curtis Gedak 319255d3bc Refactor alternate_paths logic into new Proc_Partitions_Info class
This reason for refactoring is to simplify the large GParted_Core
class, to help minimize disk reads, and to group the logic for
processing the file /proc/partitions into a single logical class.
2010-12-07 11:49:50 -07:00
Curtis Gedak 3c35a7ff42 Fix incorrect dmraid partition path name (#634553)
Enhance code so that all calls to the ped_partition_get_path
function in the libparted library go through one
GParted_Core::get_partition_path method.

This one method makes the appropriate adjustments to the dmraid
partition path name as required.

Closes bug #634553 - ntfsresize fails on RAID array
2010-11-11 10:37:04 -07:00
Curtis Gedak ceab9bde57 Ensure 1 MiB reserved when moving partition to start of disk
The 1 MiB is required for the partition table stored at the
beginning of the disk device.
2010-10-25 10:59:11 -06:00
Curtis Gedak 7c0e3fa778 Fix crash moving more than one logical partition right (#628863)
This problem would occur when using align to MiB for the
destination partitions.

Closes bug #628863 - gparted crashes applying move to right of
                     more than one logical partition
2010-10-24 12:37:57 -06:00
Curtis Gedak 1ad4864618 Change URL for "Saving Details" to a shorter path
This new URL is actually an html redirect to the actual page
location.  This permits us the flexibility to move the actual
page wherever is needed on the web site without the need to
change the URL location in the code.
2010-10-20 17:34:43 -06:00
Curtis Gedak 232800d6cd Skip move action because linux-swap contains no data (#589555)
Closes bug #589555 - Moving a swap partition needlessly copies
                     all "data" on it
2010-10-19 13:43:42 -06:00
Curtis Gedak ca30f986f7 Add virtual move method to FileSystem class
This is preparation work for the following bug report:
Bug #589555 - Moving a swap partition needlessly copies
              all "data" on it
2010-10-19 13:35:53 -06:00
Curtis Gedak 42dafa2e6a Skip copy action because linux-swap does not contain data
This change is related to the following bug report:
Bug #589555 - Moving a swap partition needlessly copies
              all "data" on it
2010-10-19 10:02:18 -06:00
Curtis Gedak d330f9a518 Fix partitions moved or copied using MiB alignment are 1 MiB larger
Correct problem introduced in version 0.6.3 whereby move or copy
operations using MiB alignment resulted in the destination
partition being 1 MiB larger.

Closes bug #632478
2010-10-18 17:08:23 -06:00
Curtis Gedak b0e36132b0 Make btrfs support a normal part of gparted
Remove need to configure with the --enable-btrfs option in order
to include btrfs support in gparted.
2010-10-18 15:28:40 -06:00
Curtis Gedak 7dd6381c43 Add more translator comments requested in bug #631684 2010-10-15 14:50:58 -06:00
Curtis Gedak 1cdb40e70d Rearrange text for warning when moving a partition 2010-10-13 09:07:53 -06:00
Curtis Gedak d7e1f295a9 Update to support plural forms for string for translators
Closes bug #631684 - Needed Translator Comments
2010-10-13 09:07:53 -06:00
Curtis Gedak 08c78ba19d Add translator comments requested in bug #631684 2010-10-12 18:14:30 -06:00
Curtis Gedak c165544506 Update URLs to new official web site gparted.org 2010-10-12 11:35:26 -06:00
Markus Elfring 1e2562adda Bug #539092: Deletion of unnecessary null pointer checks
A few null pointer checks were deleted because they were not needed any more.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2010-10-06 12:24:51 -06:00
Seth Heeren ddf225728f erase_filesystem_signatures writes uninitialized data
tagged FIXME
2010-10-05 12:54:55 -06:00
Seth Heeren 71a811cfae leaked FS structures for unsupported partition types
FILESYSTEMS vector copies anyway
2010-10-05 12:54:55 -06:00
Seth Heeren e61b5ff240 leaked regular expression (regfree not called) 2010-10-05 12:54:55 -06:00
Seth Heeren 29e4329182 Unitialized value in OperationDetail::OperationDetail 2010-10-05 12:54:55 -06:00
Seth Heeren 37dad68f45 ped_partition_get_path result not freed 2010-10-05 12:54:55 -06:00
Seth Heeren 18fed5030f leaked FS structures for new partition dialog
FILESYSTEMS vector copies anyway
2010-10-05 12:46:26 -06:00
Seth Heeren 83ff77285a leaked Gtk::HBox 2010-10-05 12:46:26 -06:00
Seth Heeren 58b0e23dd7 remove misuse of ustring in get_filesystem 2010-10-05 10:29:05 -06:00
Luca Bruno 9c41afae91 Use ext2 as default when creating new filesystems
Default to ext2 for filesystem creation, instead of the
alphabetically preceding btrfs. Do not use get_label(),
as it is not available in older gtkmm.
2010-10-05 08:51:53 -06:00
Luca Bruno 5c05233072 Provide set_used_sectors() for Btrfs
Add set_used_sectors() method to Btrfs handler, to show usage statistics
on unmounted volumes.
2010-10-03 17:00:53 +02:00
Luca Bruno 0125278eb7 List Btrfs capabilities in filesystems table
When enabled, show Btrfs capabilities in features table, without skipping
it like other multi-volume systems.
2010-10-03 17:00:53 +02:00
Luca Bruno 5765eb870c Use Btrfs handlers, if enabled at configure time
GParted already has basic support only to recognize Btrfs volumes; if
configured, use our newer methods to handle them.
Also, put in place interface controls for all supported generic actions.
2010-10-03 17:00:53 +02:00
Luca Bruno 66a3a71842 Initial Btrfs-handling modules
This adds initial handlers for Btrfs; only .create, .check and
.read_label are done for now, via external btrfs-tools.
Other methods are still only stubs.
2010-10-03 17:00:53 +02:00
Curtis Gedak adc55bec50 Fix partitions created using MiB alignment are 1 MiB larger (#631026)
Closes bug #631026 - Partitions created using MiB alignment are
                     1 MiB larger than specified
2010-09-30 11:31:25 -06:00
Curtis Gedak d040e4e584 Use direct assignment for string in class initialization
Change string initialization to use direct assignment instead of
a class method in the GParted_Core class initialization.

Thanks go to Jan Claeys for pointing out this potential problem
and providing the following link:
https://bugzilla.gnome.org/show_bug.cgi?id=627724#c7

This link contains a comment by Matthias Clasen that says:

    "In a class init function, don't do anything that causes
    other threads to initialize classed types."
2010-09-21 11:19:42 -06:00
Curtis Gedak a30f991ca5 Fix size reduced by 1 MiB when created after cylinder aligned partition
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
2010-09-09 13:18:02 -06:00
Curtis Gedak b77a5e229d Fix paste destination partition smaller than source (#626946)
Prior to this enhancement when copying and pasting a partition
after a cylinder aligned partition, the destination partition
would become smaller than the source partition if align to MiB
was selected.

Closes bug #626946 - Destination partition smaller than source
                     partition.
2010-09-09 13:18:01 -06:00
Curtis Gedak c17df56af0 Ensure default partition alignment is mebibyte 2010-09-09 13:18:01 -06:00
Curtis Gedak 9d4ae28759 Fix numerical mismatch when graphically moving logical partition (#628554) 2010-09-07 17:01:08 -06:00
Curtis Gedak aa14b25f1b Warn partition move queued that might break boot process (#627199) 2010-09-01 13:56:29 -06:00
Curtis Gedak cf68fc0704 Enable to work with new dmraid and parted without dmraid support
Newer versions (dmraid-1.0.0-rc16?) of dmraid default to always
creating partition names by inserting the letter 'p' between the
device name and the partition number.  Since this is not
consistent with older versions of dmraid, add extra logic to
ensure that newer versions of dmraid do not insert this extra
letter 'p'.

Rename method get_udev_name to get_udev_dm_name and enhance to
retrieve the property DM_NAME.

Handle situation where parted, and hence libparted, has been
configured with --disable-device-mapper.  In this situation on
some distros the device name could be /dev/dm-0.  This results in
invalid partition names such as /dev/dm-0p1.  Add logic to decode
the actual /dev/mapper name.
2010-08-25 10:33:02 -06:00
Curtis Gedak 545a8583aa Minor cosmetic formatting change 2010-08-25 09:36:13 -06:00
Curtis Gedak c55a8de305 Remove dependency on kpartx for fake RAID support
With this patch the commands required to support motherboard BIOS
RAID, also known as fake RAID, are dmraid and dmsetup.

If the kpartx command is available, it will be used to maintain
device entries that follow the naming convention used by kpartx.

Closes Ubuntu launchpad bug 554582 - GParted does not list dmraid
devices
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/554582
2010-08-17 10:36:00 -06:00
Curtis Gedak 81986c0990 Ensure partition path name is compatible with dmraid (#622217)
This patch along with a few preceding patches address the
following bug reports:

Closes bug #622217 - gparted live 0.6.0-1 incompatibility with
AMD RAID (SB750 southbridge)

Closes Ubuntu launchpad bug 600729 - Gparted not usable on
fakeraid arrays
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/600729
2010-08-17 10:36:00 -06:00
Curtis Gedak 73e7f85a2f Create new method make_path_dmraid_compatible
This method will be used to ensure that the partition path
matches the name that would be created by the dmraid command.
2010-08-17 10:36:00 -06:00
Curtis Gedak cf264a05bb Replace function ped_partition_get_path with method get_partition_path 2010-08-17 10:36:00 -06:00
Curtis Gedak 9bd8b14871 Create new method get_partition_path
This method will be used as an entry point to the libparted
function ped_partition_get_path
2010-08-17 10:36:00 -06:00
Curtis Gedak 53c49349f7 Simplify logic in set_device_partitions method
Also clean up some white space
2010-08-17 10:36:00 -06:00
Curtis Gedak 2d4c4017ca Prevent partition table creation if partitions are active
Prevent creating new partition tables on devices that have
mounted file systems, or enabled swap space.

Closes Ubuntu launchpad bug #503125 - gparted allows user to
overwrite active mounted partition
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/503125
2010-08-10 13:01:40 -06:00
Curtis Gedak f7cb37831a Add new method active_partitions_on_device_count 2010-08-10 13:01:40 -06:00
Curtis Gedak d5064dfe03 Move method to match header file
Also update copyright year
2010-08-10 13:01:40 -06:00
Curtis Gedak a4e01bc1d6 Prevent swapon and mount if partition in operation queue (#611431) 2010-08-09 13:37:08 -06:00
Curtis Gedak 44698448aa Add new method partition_in_operation_queue_count 2010-08-09 13:33:28 -06:00
Mike Fleetwood 3194121496 Add labelling of linux-swap
When found, use external swaplabel command to label linux-swap
partitions.  (Available from util-linux-ng 2.18 released 30 Jun 2010).
2010-08-08 10:36:34 -06:00
Curtis Gedak a3d70a1fbf Ensure original partition boundaries kept on rollback of failed move 2010-07-22 17:18:48 -06:00
Curtis Gedak c3a06ffd6c Fix problem with logical partition move overwriting EBR (#623630)
Prevent overwriting meta data (Extended Boot Rectors) for logical
partitions by temporarily increasing the size of the logical
partition to encompass all of the space involved in the move
operation.  The libparted library will move the EBR as needed to
permit this to happen.  After the move the logical partition is
set to the proper size.

This fixes bug #623630 - Move logical partition to right yields
invalid partition table on /dev/sda - wrong signature 0
2010-07-22 17:18:48 -06:00
Curtis Gedak a92f2dad39 Re-enable MiB partition alignment option 2010-07-22 17:18:48 -06:00
Curtis Gedak 1e1ea1f09c Disable MiB alignment temporarily until bug #623630 can be fixed 2010-07-08 09:22:43 -06:00
Curtis Gedak e810b7f7f0 Fix crash moving partitions when size is a multiple of 16 MiB (#623697) 2010-07-06 13:12:19 -06:00
Curtis Gedak f173a51f0b Enable support for devices with sector sizes > 512 bytes (#607165)
GParted requires libparted version 2.2 or higher to support devices
with sector sizes > 512 bytes.

This commit marks the end of a series of enhancements required to
provide support for sector sizes > 512 bytes.
2010-05-27 11:08:40 -06:00
Curtis Gedak be53cf584b Fix off by 1 sector math when looking for unallocated space 2010-05-27 10:59:12 -06:00
Curtis Gedak 87e48efe88 Only show exactly 1 MiB unallocated space if not MBR or EBR
Do not show unallocated space of exactly 1 MiB in size if:

  a) The space is at the front of the drive.

     This space is reserved for the partition table and the
     Master Boot Record.

or

  b) The space immediately precedes a logical partition.

     This space is reserved for the Extended Boot Record.
2010-05-27 09:27:00 -06:00
Curtis Gedak b74dba4f67 Change behavior to better align with GNOME HIG on drop-down lists
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."
2010-05-26 17:33:38 -06:00
Curtis Gedak f861501390 Improve cylinder alignment for partitions less than a disk cylinder 2010-05-26 16:57:59 -06:00
Curtis Gedak 95c9577d8f Limit graphic movement according to required boot record space
Also respect minimum size for extended partition in graphical
representation.

This change is part of adding the option to align to MiB (#617409).
2010-05-25 16:26:08 -06:00
Curtis Gedak 24d96114ca Fix short by 1 MiB on spinbutton before with resize/move 2010-05-25 16:26:08 -06:00
Curtis Gedak 40bb656de5 Disable resizing when the total area is less than two mebibytes 2010-05-25 16:26:07 -06:00
Curtis Gedak ebdb9466e0 Ensure space available for GPT backup partition table on paste 2010-05-25 16:26:07 -06:00
Curtis Gedak e62a23b5b5 Add partition alignment option to align to MiB (#617409)
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.
2010-05-20 10:00:14 -06:00
Curtis Gedak 2cdfb4c55a Change partition alignment check box to a drop down menu
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.
2010-05-09 14:45:26 -06:00
Curtis Gedak 3db6b074c9 Remove incorrect comment 2010-05-04 15:47:34 -06:00
Curtis Gedak b45b30c2ed Ensure sector size is set when getting a new partition
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-05-04 15:19:49 -06:00
Curtis Gedak 8155d4786d Fix used and unused sector math when pasting a copied partition
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-05-04 15:18:43 -06:00
Curtis Gedak bec2a6f176 Fix minimum size calculation when pasting a copied partition
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-05-04 15:00:39 -06:00
Curtis Gedak 6369e58bff Enhance detection for ext3, fat16, fat32, linux-swap, and hfsplus
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-28 14:11:24 -06:00
Curtis Gedak 66355153fb Enhance file system space unused math to use actual sector size 2010-04-28 13:25:57 -06:00
Curtis Gedak 9e5e9f5627 Enhance file system detection to use FS_Info method - blkid
This enhancement was added because the current libparted library,
version 2.2, does not appear to detect file systems for sector
sizes other than 512 bytes.
2010-04-28 12:58:28 -06:00
Curtis Gedak 7e2ca14756 Rename get_length method to get_sector_length
This rename is to try to reduce future confusion between
partition length in sectors versus partition length in bytes.
2010-04-28 09:11:44 -06:00
Curtis Gedak 70448f4fb0 Replace sector math with get_byte_length method where appropriate
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-27 12:54:14 -06:00
Curtis Gedak c3cae3b6eb Enhance set_valid_operations method to handle different sector sizes 2010-04-27 11:41:43 -06:00
Curtis Gedak fe9ee68385 Create get_byte_length method 2010-04-27 11:28:36 -06:00
Curtis Gedak cb08e8c7dd Remove 512 byte based units and rename _FACTOR to BYTE
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.
2010-04-26 13:40:38 -06:00
Curtis Gedak 81a903cda2 Replace constant MEBIBYTE with appropriate MEBI_FACTOR math
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-26 13:21:18 -06:00
Curtis Gedak 5d2bf2ec5d Replace default sector size with appropriate sector size
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-26 11:52:33 -06:00
Curtis Gedak 896dab7192 Enhance copy_filesystem method to work with sector sizes
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-26 11:43:59 -06:00
Curtis Gedak c3352fb24a Clean up progress bar current status after copy/move action
Also ensure that final progress bar current status is set to
completed value when the copy blocks method completes.
2010-04-25 11:09:18 -06:00
Curtis Gedak 0d5c06f85d Add logic for copy and paste between devices with different sector sizes
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-23 13:28:41 -06:00
Curtis Gedak 74ecd2ed3f Set sector size and add to operation and dialog methods
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-19 19:22:31 -06:00
Curtis Gedak 4bcd0a3704 Add device sector size to partition object
The device sector size is needed in all calculations that convert
between sectors and bytes.  The device sector_size is included in
the partition object because this object is used to contain
operation information in addition to actual partitions and
unallocated space.  A second option was considered to pass the
device object to many methods, but this was considered a much
larger task that might not provide significant gains in
maintainability.
2010-04-19 19:06:08 -06:00
Curtis Gedak 8fb40d843d Enhance copy methods for sector sizes > 512 bytes 2010-04-07 11:39:42 -06:00
Curtis Gedak 1a498b62bf Enable copy to work on computers with only 128 MiB RAM (#613430) 2010-03-24 14:47:46 -06:00
Curtis Gedak 44e5176ee5 Enhance format_size() for sector sizes > 512 bytes 2010-03-24 14:37:08 -06:00
Curtis Gedak eb7e09aac8 Remove GParted:: prefix from in front of UNIT constants 2010-03-24 14:37:08 -06:00
Curtis Gedak 1aa81bba94 Enhance sector_to_unit() for sector sizes > 512 bytes 2010-03-24 14:37:08 -06:00
Curtis Gedak f9f603256e Convert file system maximum from sector to byte value 2010-03-24 14:37:08 -06:00
Curtis Gedak 40d7dbac4b Convert file system minimum from sector to byte value 2010-03-24 14:37:08 -06:00
Curtis Gedak f23746959f Fix mkswap error "UUID parsing failed" when resizing with no UUID
See following debian bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573836
2010-03-14 13:46:59 -06:00
Curtis Gedak e786bfa598 Enhance erase_filesytem_signatures() for sector sizes > 512 bytes 2010-03-14 13:46:59 -06:00
Curtis Gedak 892e56f9b6 Enhance file system detection for sector sizes > 512 bytes 2010-03-14 13:46:59 -06:00
Curtis Gedak 4c0b514e22 Set device length to value from libparted
Previously this value was calculated to end on a cylinder
boundary.  On today's larger hard drives, which simply emulate
Cylinders/Heads/Sectors, some disk space might remain after the
last cylinder.  This space would always be less than a full
cylinder in size.  Now this space will be visible to the user.
2010-03-14 13:46:59 -06:00
Petr Uzel c722047c36 Avoid compiler warning
Report of this problem can be found in the mailing list archive:
http://sourceforge.net/mailarchive/forum.php?thread_name=4B967C26.2090608%40gmail.com&forum_name=gparted-devel
2010-03-10 09:11:40 -07:00
Curtis Gedak 260e0ea190 Fix bug when copying huge NTFS partition never finishes (#575324)
Improved logic in cleanup_cursor method to minimize the number of
string erase operations performed.

Previously when the NTFS copy finished, GParted would take an
exceptionally long time to clean up the output.  This was due to
the huge number of small string erase operations performed on a
extremely large string.
2010-03-01 13:56:05 -07:00
Curtis Gedak 39208ba2af Add check if partition table re-read work around code is needed
A patch to alleviate the "failure to inform kernel of partition
changes problem" (bug #604298) has been included in parted-2.2.
Hence when parted-2.2 or higher is used, the work around code in
GParted is not required.
2010-03-01 11:05:03 -07:00
Curtis Gedak 4e2be4047c Remove comment about wrong identifier for HFS/HFS+ (#568867)
With parted-2.2 the partition identifier for HFS and HFS+ is set to 0xAF.
With previous versions of parted this was incorrectly set to 0x83.
2010-02-26 10:36:54 -07:00
Curtis Gedak 70584176de Disable extended option for non-MSDOS and non-DVH disk types (#583906)
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.
2010-02-24 11:39:42 -07:00
Curtis Gedak ed6d8f0cee Make partition "New" label available for translation (#610540) 2010-02-22 10:33:18 -07:00
Curtis Gedak 19d8f0dfc8 Add sector size to device display pane
Also add sector_size to Device class.  This is the start of an
enhancement to add support for devices with sector sizes other
than 512 bytes (#607165).
2010-02-20 15:12:26 -07:00
Curtis Gedak eba0c88da5 Indicate required software packages if unable to read file system (#576908) 2010-02-20 11:27:58 -07:00
Curtis Gedak 3dd34af909 Avoid crashes by ignoring devices with sector size > 512 bytes (#595309)
This is not an ideal solution because devices with sector sizes
greater than 512 bytes are silently ignored from a graphical interface
perspective.  Only if the user starts gparted from the command line
will the "ignoring device" message be seen.

In my opinion this short term solution of ignoring these devices is
still better than a gparted crash which might also result in data
loss.

A bug report requesting support for devices with sector sizes > 512
bytes has been created.
https://bugzilla.gnome.org/show_bug.cgi?id=607165

Thanks go to Jan Claeys for the initial small patch.
2010-01-16 11:45:29 -07:00
Curtis Gedak bf86fd3f9c Work around: retry ped_disk_commit_to_os() after sleep(1) (#604298)
Bug #604298 involves a problem that can occur when GParted uses
libparted to manipulate a partition table, but the
ped_disk_commit_to_os() function fails to inform the Linux kernel of
these changes to the partition table.  This problem is intermittent in
nature and is difficult to reliably reproduce.

This change is an attempt at a work around.  If the first call to
ped_disk_commit_to_os() fails, then we sleep for 1 second to allow the
system to settle before invoking the function call again.  My testing
has shown that this greatly improves the chances of successfully
informing the kernel of partition changes.

Thanks go to François Dupoux and Steven Shiau for their suggestions
and help to resolve this problem.
2010-01-15 15:39:06 -07:00
Curtis Gedak cf22c99424 Update copyright years in fat16.cc and fat32.cc 2010-01-14 10:59:30 -07:00
Curtis Gedak 1155fa6dab Fix problem reading some FAT32 partitions (#605175)
This problem was introduced with GParted 0.4.7 when the "-a"
option was removed from the dosfsck command.  The dosfsck command
is used to read the number of used sectors.  Instead we will now
use the "-n" option which does not write any changes to the file
system, and allows non-interactive operation.
2010-01-14 10:50:49 -07:00
Curtis Gedak 51d1c4c552 Ensure commit_to_os() return code is passed up through commit() method
This problem was discovered while investigating bug #604298
2010-01-08 11:02:16 -07:00
Curtis Gedak 2f9bf91883 Update copyright year 2010-01-02 15:07:03 -07:00
Curtis Gedak 20f5c6f83b Clean up code for old bug #157871
Remove commented code and boolean use-C-lang parameter for
Utils::num_to_str() method because this bug was fixed in
gcc-4.0.3.  The GNU gcc compiler versions 4 and up are now
commonly in use.  Also due to previous partial commenting and
removal of the code, the code was non-functional

Thanks goes to Jan Claeys for pointing out this clean up
opportunity.
2010-01-02 15:04:30 -07:00
Curtis Gedak 1ef489fcd8 Clear libparted kernel re-read messages when scanning devices
When calling commit_to_os() with newer Linux kernels,
parted-1.9.0, and at least one partition mounted on the device,
the following error message is displayed:

    The kernel was unable to re-read the partition table on
    /dev/sda (Device or resource busy).  This means Linux won't
    know anything about the modifications you made until you
    reboot.  You should reboot your computer before doing
    anything with /dev/sda.

If this message is not cleared then it will remain in the
libparted_message array and could potentially be displayed along
with an error message for a subsequent scanned disk device.
2009-12-09 13:16:18 -07:00
Curtis Gedak 098cb0cddf Change field labels to sentence capitalization
Change is to align with GNOME Human Interface Guidelines 2.2.
http://library.gnome.org/devel/hig-book/stable/design-text-labels.html.en
2009-12-06 14:36:39 -07:00
Curtis Gedak 906b969ecd Change wording from disk label type to more common partition table 2009-12-06 14:32:12 -07:00
Curtis Gedak 0fba953cd9 Capture libparted messages when invalid partition table found #337244
When libparted reports a problem with the partition table, capture
this message and attach it to the "unallocated" partition that spans
the entire disk.

Examples of these types of problems encountered are:
     /dev/sda: unrecognised disk label
     Can't have overlapping partitions.
2009-12-03 15:59:49 -07:00
Curtis Gedak ef2fc4919c Re-enable ability to paste into an existing partition (#582101)
The ability to paste into an existing partition was disabled in
v0.4.0.  This ability has been re-enabled along with a warning
dialog that indicates the data in the existing partition will be
lost if the copy and paste operation is applied.
2009-11-25 12:39:02 -07:00
Curtis Gedak 8cfb27b718 Cleanup file copyright entries
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.
2009-11-05 11:08:49 -07:00
Curtis Gedak 1607d13a06 Added auto detection of Linux software RAID devices
Auto detection of Linux software RAID devices was lost in GParted
0.3.8.  This was because device scanning by the libparted device
call ped_device_probe_all() was replaced with custom code within
GParted to scan /proc/partitions for devices.

The reason the libparted call was replaced was due to a long
scanning problem with ped_device_probe_all(), a non-existent
physical floppy device, and a BIOS setting indicating a floppy
drive existed.  See bug #351753:
https://bugzilla.gnome.org/show_bug.cgi?id=351753
2009-11-03 13:30:44 -07:00
Curtis Gedak e2ef2ca671 Rename NO_DOC to HAVE_DISABLE_DOC for consistency sake 2009-11-03 10:57:15 -07:00
Curtis Gedak c2d19a8ab4 Replace gnome-open with gtk_show_uri (#600046)
This change was performed to align with a GNOME goal:
http://live.gnome.org/GnomeGoals/RemoveGnomeOpenGnomeHelp

For backwards compatibility, the gnome-open command is used
when gtkmm < 2.14.0.
2009-11-03 10:27:35 -07:00
Curtis Gedak 33d7e31d3c Change em dashes to period with new sentence
With the em dashes in the translatable strings, a 'make distcheck'
would fail.  Hence these have been change to be a period followed by a
new sentence.
2009-10-26 15:19:04 -06:00
Curtis Gedak c85de03ee3 Remove unable to re-read partition table warning (#599078)
When used with parted-2.0, GParted would display a warning
message indicating "kernel unable to re-read partition table" on
every device scan for each device with at least one partition
mounted.  Device scans occur when GParted starts up, immediately
after a series of actions are applied, and upon manually invoked
device refreshes.  This, I believe, is excessive notification to
the user and would be annoying.
2009-10-26 14:48:22 -06:00
Curtis Gedak 83381f85f1 Ensure no pending operations before creating partition table (#583896)
This fixes a situation where GParted would crash if a user queued
up some operations, created a new partition table, and then
applied the operations.
2009-10-25 14:35:12 -06:00
Curtis Gedak 73471032c9 Improve feedback when creating or pasting partition (#579266)
Improve the feedback to the user when creating or pasting a
partition on a device with no partition table found.

Prior to this enhancement if a user tried to create or paste a
partition onto a device with no partition table found, GParted
would present the user with a Create Partition Table dialog.

When creating a new partition this could cause confusion for
users who were trying to format the disk.  The user could
mistakenly believe the choice of an MS-DOS file system was being
presented.

Similarly on a paste operation it could be confusing to be
presented with a dialog to create a partition table without any
explanation of why a partition table was suddenly required in the
midst of the paste operation.

Neither the new partition creation, nor the partition paste
actions were performed after the Create Partition Table dialog
was displayed.
2009-10-24 14:16:40 -06:00
Curtis Gedak 0af42af3d0 Add padding to progress dialog window 2009-10-22 10:19:47 -06:00
Curtis Gedak a960d280d8 Change field labels to sentence capitalization (#583885)
This change done to align with the GNOME Human Interface Guidelines.
http://library.gnome.org/devel/hig-book/stable/design-text-labels.html.en
2009-10-21 15:25:44 -06:00
Curtis Gedak 4a8ecdc613 Remove repeated titles in progress dialog (#589558) 2009-10-18 13:06:40 -06:00
Curtis Gedak acdddc0770 Add help dialog when configured with --disable-doc 2009-10-17 15:43:20 -06:00
Curtis Gedak cf4a962c73 Further improve dmraid device and name recognition 2009-10-14 11:09:23 -06:00
Curtis Gedak 5f6301d1b0 Rework logic to resolve real path for symbolic link devices (#582687) 2009-10-13 17:45:04 -06:00
Bruce Cowan b44516a9d4 Minor string fixes (#597686) 2009-10-13 12:24:02 -06:00
Curtis Gedak 0810792f02 Ensure dmraid devices created for devices passed on command line 2009-09-30 16:32:32 -06:00
Curtis Gedak fa0b88c701 Improve logic for retrieval of device udev name 2009-09-30 16:25:19 -06:00
Curtis Gedak 78c3174694 Improve logic to recognize dmraid devices 2009-09-30 16:16:27 -06:00
Curtis Gedak d63c97ef42 Simplify logic to ensure dmraid_devices cleared before populating 2009-09-30 16:08:03 -06:00
Seth Hunter df541b8986 Fix problem with create new partition size off by one sector (#596552)
With "Round to cylinders" deactivated, creating a new partition would
create a partition that was one sector too large.

Closes GParted bug #596552
2009-09-28 16:32:04 -06:00
Curtis Gedak 6fa8ad4818 Made set_used_sectors method less meddlesome for FAT16/32
Removed the "-a" flag from the dosfsck command that is used to
determine the number of used sectors in FAT16 and FAT32 file systems.

Related to GParted bug #569921
2009-08-11 15:33:59 -06:00
Curtis Gedak 6d90d0fbcd Resolve real path for symbolic link devices in mount files (#582687)
In order to find a match between the device paths in mount files and
partitions as found by libparted, the mount device must be a real path
and not a symbolic link.

Closes GParted bug #582687
2009-08-09 14:26:07 -06:00
Curtis Gedak 5e07fb434d Place translator comment in proper location (#590415) 2009-07-31 18:56:31 -06:00
Curtis Gedak 8aa941204c Enhance to use new linux-swap "filesystem" types added in parted-1.9.0
Excerpt from parted-1.9.0 release notes follows:
  In libparted, the linux-swap "filesystem" types are now called
  "linux-swap(v0)" and "linux-swap(v1)" rather than "linux-swap(old)"
  and "linux-swap(new)" as in parted 1.8, or "linux-swap" as in older
  versions; "old" and "new" generally make poor names, and v1 is the
  only format supported by current Linux kernels. Aliases for all
  previous names are available.
2009-07-28 15:38:30 -06:00
Curtis Gedak 5f3c806561 Enhance file parsing to handle tabs properly (#582687)
Previously the read_mountpoints_from_file() method only expected
a space between arguments in files such as /etc/fstab.  Valid
delimiters are now space and tab.

Related to GParted bug #582687
2009-07-23 16:09:22 -06:00
Curtis Gedak ae912379cc Cleanup white space in read_mountpoints_from_file method 2009-07-23 16:09:22 -06:00
Curtis Gedak 0899b72dd3 Remove extra blank line accidentally added in last commit 2009-07-06 16:23:02 -06:00
Curtis Gedak 8e8bf7e544 Change button create to apply for partition table creation (#576374)
To further minimize the chance of accidentally creating a new partition
table, the following steps have been taken:

1)  Rename non-standard Create button to stock Apply button.
2)  Remove extra warning about erasing entire disk device.
3)  Update GParted Manual accordingly.

Closes GParted bug #576374
2009-07-06 15:58:08 -06:00
Curtis Gedak 746a2f2f09 Improve error messages and translator comments
Provide translator sample text, and add more detail to error messages
when updating the ntfs boot sector.
2009-05-16 12:45:43 -06:00
Curtis Gedak dd8a57a8fe Remove requirement for xxd and dd for NTFS move or paste action
Perform direct update of Number of Hidden Sectors in NTFS boot record.
This change removes the need for /usr/bin/xxd and /bin/dd.
Related to GParted bug #574389
2009-05-16 12:15:14 -06:00
Curtis Gedak f164e78153 Require xxd and dd for NTFS move or paste action
Related to GParted bug #574389
2009-05-14 14:59:49 -06:00
Curtis Gedak 9238e47bc2 Remove absolute paths from /usr/bin/xxd and /bin/dd 2009-05-14 14:45:11 -06:00
Curtis Gedak e7352a5000 Ensure /dev file system device entries created before adding device 2009-05-02 10:59:49 -06:00
Curtis Gedak 301bd77312 Refactor some logic into separate settle_device method 2009-05-02 10:59:49 -06:00
Curtis Gedak 22b6b27703 Improve file system detection with fall back to vol_id 2009-05-02 10:59:49 -06:00
Curtis Gedak 2a89d936d6 Remove get_dmraid_prefix method used to specify a single device
It appears that different dmraid versions handle specifying a
single dmraid device differently.

dmraid-1.0.0.rc14 uses a partial name only,
  such as "isw" or "isw_cjbdddajhi".
dmriad-1.0.0.rc15 uses a full name only,
  such as "isw_cjbdddajhi_Vol0".

To maintain compatibility with the broadest range of dmraid versions,
the ability to specify a single dmraid device is being removed.
2009-04-29 16:34:30 -06:00
Curtis Gedak 3f773c3ae8 Ensure kpartx is executed even if dmraid fails 2009-04-29 16:23:28 -06:00
Curtis Gedak 301f58c977 Remove temporary debugging information accidentally committed 2009-04-28 14:23:09 -06:00
Curtis Gedak 58c9336e9d Enhance get_dmraid_name to also check udev information if needed 2009-04-28 14:21:56 -06:00
Curtis Gedak 9816f5c18a Refactor some logic into separate get_udev_name method 2009-04-28 13:42:47 -06:00
Curtis Gedak 63980c0def Minor style change to place braces on a separate line 2009-04-27 15:17:45 -06:00
Curtis Gedak ce4de8b51e Improve dmraid device detection with checking udev if needed
Some distros appear to display /dev/dm-# device names with
libparted.  Since this fails a pattern match with the dmraid
device name, check with udev to see if a pattern match is
possible with the name returned from udevinfo or udevadm info.

For example:
     /dev/mapper/isw_cjbdddajhi_Vol0 is the device name
     /dev/dm-0 is a symbolic link pointing to the above device name
2009-04-26 16:45:53 -06:00
Curtis Gedak 5112e41815 Update copyright year for FS_Info class 2009-04-26 15:49:30 -06:00
Curtis Gedak 47f0d6bd5d Enhance UUID detection to fallback to vol_id if available
Normally, the blkid command will detect the UUID for a file system.
In cases where blkid fails to detect the UUID and the vol_id command
is available, then try using the vol_id command.
2009-04-24 17:46:05 -06:00
Curtis Gedak 8d024d86df Improve initialization logic for FS_Info class
Ensure that fs_info_cache is populated in any first instantiation in
a program, even for an instantiation such as:
    FS_Info A(false);
2009-04-24 17:18:36 -06:00
Curtis Gedak a05751ea95 Enhance to try udevadm if udevsettle is not found
Newer systems might not have udevsettle.  It has been replaced by
"udevadm settle".
Thanks to Lorenzo Cogotti aka Micia for this knowledge, and for a
proposed solution.
2009-04-24 11:12:29 -06:00
Curtis Gedak 7c2c771266 Minor cosmetic fix to reorder Reiser4 detection code
Now the Reiser4 detection code better matches the detection code for
other file systems.
2009-04-22 16:55:47 -06:00
Curtis Gedak 7695593d21 Improve crypt-luks detection (#578300)
Move crypt-luks detection prior to libparted file system detection.
If libparted file system detection is performed first, then encrypted
file systems such as ext3 will be incorrectly detected by libparted as
plain 'ext3' when in fact these file systems are encrypted.
2009-04-22 16:47:13 -06:00
Curtis Gedak 6e287d1911 Updated translation and code comments
svn path=/trunk/; revision=1110
2009-03-27 16:58:31 +00:00
Curtis Gedak bbff867267 Maintained label and uuid when resizing swap
svn path=/trunk/; revision=1105
2009-03-23 20:01:03 +00:00
Curtis Gedak 5b9183ca26 Fixed error when resizing an extended partition
svn path=/trunk/; revision=1104
2009-03-23 18:51:33 +00:00
Curtis Gedak 946b462757 Enhanced dmraid partition deletion
svn path=/trunk/; revision=1098
2009-03-16 22:59:50 +00:00
Curtis Gedak eda5bf16aa Improved swap and dmraid mountpoint detection
svn path=/trunk/; revision=1097
2009-03-16 22:55:24 +00:00
Curtis Gedak eb4ad0615d Added initial support for dmraid devices
svn path=/trunk/; revision=1093
2009-03-14 20:09:28 +00:00
Curtis Gedak 5865c92dc0 Added new class for dmraid support
svn path=/trunk/; revision=1092
2009-03-14 20:02:41 +00:00
Curtis Gedak dbf81bc417 Removed file_exists() method. Glib::file_test() already exists and is available for use.
svn path=/trunk/; revision=1091
2009-03-13 14:17:22 +00:00
Curtis Gedak 2390671112 Added tokenize() and file_exists() methods
svn path=/trunk/; revision=1090
2009-03-12 19:37:12 +00:00
Curtis Gedak f259327c82 Enabled type checking (const instead of #define)
svn path=/trunk/; revision=1080
2009-02-27 17:33:20 +00:00
Curtis Gedak 14363d96f4 Added recognition of /dev/mmcblk* SD/MMC devices
svn path=/trunk/; revision=1079
2009-02-25 20:42:44 +00:00
Curtis Gedak dc1ab54d8f Added detection of btrfs file system
svn path=/trunk/; revision=1075
2009-02-23 20:22:30 +00:00
Curtis Gedak 147562afff Fixed compiler warning regarding parentheses
svn path=/trunk/; revision=1072
2009-02-20 20:32:49 +00:00
Curtis Gedak 3ef0293876 Added detection of LUKS encrypted partitions
svn path=/trunk/; revision=1071
2009-02-18 16:19:49 +00:00
Curtis Gedak 42b63cc274 Enhanced move/resize functionality - Only move start sector if dialog space before value is changed.
svn path=/trunk/; revision=1070
2009-02-16 19:53:43 +00:00
Curtis Gedak ad078627d5 Added strict_start indicator
svn path=/trunk/; revision=1069
2009-02-16 19:37:27 +00:00
Curtis Gedak a1f9a0c191 Fixed crash on startup with Russian language
svn path=/trunk/; revision=1061
2009-02-09 17:58:42 +00:00
Curtis Gedak 0375182e3c Fixed partition type for linux-swap(new).
svn path=/trunk/; revision=1045
2009-01-28 17:48:40 +00:00
Curtis Gedak e77e1e3dbc Enhanced copy/paste checks when MBR/EBR involved.
svn path=/trunk/; revision=1040
2009-01-24 17:16:57 +00:00
Curtis Gedak 1723bfd723 Reworded caution message when applying operations
svn path=/trunk/; revision=1033
2009-01-19 20:38:22 +00:00
Curtis Gedak b971ec23ef Removed space between menu entry and periods
svn path=/trunk/; revision=1031
2009-01-13 18:14:20 +00:00
Curtis Gedak 6b44ab2a50 Removed redundant command flag options.
svn path=/trunk/; revision=1027
2009-01-07 21:42:05 +00:00
Curtis Gedak a52b989903 Actually commit changes from src/GParted_Core.cc, and remove src/Partition.o that was accidentally committed in it's place.
svn path=/trunk/; revision=1026
2009-01-07 04:40:16 +00:00
Curtis Gedak b16825dbb8 Redo update copyright year range, again
svn path=/trunk/; revision=1025
2009-01-06 23:28:43 +00:00
Curtis Gedak 060c8d87e3 Added two FS types to recognition as linux-swap.
The GIT version of libparted returns types of linux-swap(new) and linux-swap(old), previously only linux-swap was returned.

svn path=/trunk/; revision=1024
2009-01-06 22:37:08 +00:00
Curtis Gedak b54fdfc673 Redo update copyright year range. Previous change removed trailing whitespace, and hence made for way to many differences that make diff comparisons difficult.
svn path=/trunk/; revision=1023
2009-01-06 22:22:09 +00:00
Curtis Gedak f61713d56a Update copyright year range
svn path=/trunk/; revision=1022
2009-01-03 22:36:24 +00:00
Curtis Gedak 8a1fb683d0 Added e2fsprogs version required for ext4 support
svn path=/trunk/; revision=1019
2009-01-01 00:09:04 +00:00
Curtis Gedak 8a1760928f Fixed application crash when saving details and locale not set
svn path=/trunk/; revision=1012
2008-12-21 18:55:10 +00:00
Curtis Gedak 51b1720be3 Add flags to create journal and use extent option
svn path=/trunk/; revision=1008
2008-12-20 19:56:27 +00:00
Curtis Gedak 533eb1bc03 Added support for ext4 file systems
svn path=/trunk/; revision=1005
2008-12-18 22:13:43 +00:00
Curtis Gedak c020834508 Created 2 files to support ext4 operations.
Support for ext4 is planned for version 2.6.28 of the Linux kernel.

svn path=/trunk/; revision=1004
2008-12-18 22:07:06 +00:00
Curtis Gedak 5493f7ecc6 Added get_fs_type() method to retrieve the file system type
svn path=/trunk/; revision=1003
2008-12-18 21:36:57 +00:00
Curtis Gedak 7a3fa5a7dd Reduced FS_Info cache disk reads
svn path=/trunk/; revision=1001
2008-12-08 18:23:30 +00:00
Curtis Gedak 4ef71e5004 Added lvm2 physical volume detection
svn path=/trunk/; revision=1000
2008-12-07 18:43:35 +00:00
Curtis Gedak 165da328fb Made text by field labels selectable.
Useful for copy/paste of UUID or volume label.

svn path=/trunk/; revision=997
2008-12-03 18:52:20 +00:00
Curtis Gedak 4370af8779 Added text selectable parameter to mk_label()
svn path=/trunk/; revision=996
2008-12-03 18:18:04 +00:00
Curtis Gedak 504eb04ddc Roll back (remove) code to recognize /dev/mapper/* devices, because too many entries such as LVM partitions are wrongly added to the device list.
svn path=/trunk/; revision=989
2008-11-29 17:08:52 +00:00