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