Skip to content
  • Mike Fleetwood's avatar
    Stop recognising retired libparted linux-swap names · 40ec0deb
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    With this commit in parted 1.8.3 [1], libparted changed from reporting
    the name of Linux swap as:
        linux-swap
    to reporting either:
        linux-swap(old)
        linux-swap(new)
    Later with this commit in parted 1.9 [2], libparted stopped reporting
    those names and reported these instead:
        linux-swap(v0)
        linux-swap(v1)
    
    Demonstration:
        # 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.
    
    [1] http://git.savannah.gnu.org/cgit/parted.git/commit/?id=98a53fd115ca012edf226525b8d4be628454f99e
        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.
    
    [2] http://git.savannah.gnu.org/cgit/parted.git/commit/?id=cfafa4394998a11f871a0f8d172b13314f9062c2
        Rationalise linux-swap fs names, and add a "linux-swap" alias
    
    [3] 8df975c7
        Increase minimum required libparted to 2.2 (!22)
    40ec0deb