Commit ab1381b1 authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak

Stop trying unneeded alternative libparted linux-swap names

With that same commit in parted 1.9 [1], libparted only recognised these
linux-swap names via deprecated aliases:
    linux-swap(old)
    linux-swap(new)
but does accept this name as a current alias:
    linux-swap
for:
    linux-swap(v1)

Demonstration:
    # parted -v
    parted (GNU parted) 2.1
    ...

    # parted /dev/sdc mkfs yes 1 "linux-swap(new)" unit s print
    ...
    [0] filesys.c:148 (ped_file_system_type_get(): File system alias linux-swap(new) is deprecated
    ...
    Number  Start  End       Size      Type     File system     Flags
     1      2048s  2099199s  2097152s  primary  linux-swap(v1)

    # parted /dev/sdc mkfs yes 1 "linux-swap" unit s print
    ...
    Number  Start  End       Size      Type     File system     Flags
     1      2048s  2099199s  2097152s  primary  linux-swap(v1)

Again as GParted now requires libparted 2.2 or later:
1) Stop using alternative "linux-swap(new)" name as that is deprecated
   by libparted.
2) Also stop using alternative "linux-swap(v1)" name as that code is
   never used because libparted recognised the GParted "linux-swap"
   name as a current alias.

[1] http://git.savannah.gnu.org/cgit/parted.git/commit/?id=cfafa4394998a11f871a0f8d172b13314f9062c2
    Rationalise linux-swap fs names, and add a "linux-swap" alias
parent 40ec0deb
......@@ -3554,14 +3554,6 @@ bool GParted_Core::set_partition_type( const Partition & partition, OperationDet
if (partition.filesystem != FS_CLEARED)
lp_fs_type = ped_file_system_type_get(fs_type.c_str());
// If not found, and FS is linux-swap, then try linux-swap(v1)
if ( ! lp_fs_type && fs_type == "linux-swap" )
lp_fs_type = ped_file_system_type_get( "linux-swap(v1)" );
// If not found, and FS is linux-swap, then try linux-swap(new)
if ( ! lp_fs_type && fs_type == "linux-swap" )
lp_fs_type = ped_file_system_type_get( "linux-swap(new)" );
// If not found, and FS is udf, then try ntfs.
// Actually MBR 07 IFS (Microsoft Installable File System) or
// GPT BDP (Windows Basic Data Partition).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment