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.
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.
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.
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.
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.
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.
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.
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.