Commit 40ec0deb authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak

Stop recognising retired libparted linux-swap names

With this commit in parted 1.8.3 [1], libparted changed from reporting
the name of Linux swap as:
to reporting either:
Later with this commit in parted 1.9 [2], libparted stopped reporting
those names and reported these instead:

    # mkswap /dev/sdc1
    Setting up swapspace version 1, size = 1048572 KiB
    no label, UUID=a2010834-003d-4bf2-9e94-58383fe20a26
    # blkid /dev/sdc1
    /dev/sdc1: UUID="a2010834-003d-4bf2-9e94-58383fe20a26" TYPE="swap"
    # parted -v
    parted (GNU parted) 2.1
    # parted /dev/sdc unit s print
    Number  Start  End       Size      Type     File system     Flags
     1      2048s  2099199s  2097152s  primary  linux-swap(v1)

As GParted now requires libparted 2.2 or later [3], remove recognition
for those no longer libparted reported linux-swap names.  Note that the
"swap" name is reported by blkid.

    Enable support for swsusp partitions, and the ability to
    differentiate between old and new versions of linux-swap partitions.
    Changed the swap_init signature and removed extra ped_geometry_read
    from _swap*_open.

    Rationalise linux-swap fs names, and add a "linux-swap" alias

[3] 8df975c7
    Increase minimum required libparted to 2.2 (!22)
parent 4d9dc14b
......@@ -1465,12 +1465,9 @@ FSType GParted_Core::detect_filesystem( PedDevice * lp_device, PedPartition * lp
else if ( fsname == "ext4" ||
fsname == "ext4dev" )
return FS_EXT4;
else if ( fsname == "linux-swap" ||
fsname == "linux-swap(v1)" ||
fsname == "linux-swap(new)" ||
fsname == "linux-swap(v0)" ||
fsname == "linux-swap(old)" ||
fsname == "swap" )
else if (fsname == "linux-swap(v0)" ||
fsname == "linux-swap(v1)" ||
fsname == "swap" )
else if ( fsname == "crypto_LUKS" )
return FS_LUKS;
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