Commit 0b5cfd34 authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak

Stop checking for 'btrfs filesystem label' support (!26)

btrfs-progs 3.12 includes 'btrfs filesystem label /dev/PTN NEWLABEL'
functionality so stop checking for this before enabling setting the

    $ btrfs version
    Btrfs v3.12
    $ btrfs filesystem label --help
    usage: btrfs filesystem label [<device>|<mount_point>] [<newlabel>]

        Get or change the label of a filesystem

        With one argument, get the label of filesystem on <device>.
        If <newlabel> is passed, set the filesystem label on <newlabel>.

    $ echo $?

Worst case scenario is that some how an old version of the btrfs command
is used which doesn't support the labelling functionality.  Then this
commit would change GParted from disallowing labelling of a btrfs, to
allowing it, but presumably it would fail with an error from the btrfs
command reporting so.  Arguably better from a support point of view.

Closes !26 - Remove support for btrfs-progs < 3.12
parent 05d9919a
Pipeline #68473 passed with stages
in 21 minutes and 12 seconds
......@@ -56,6 +56,7 @@ FS btrfs::get_filesystem_support()
// Use these btrfs multi-tool sub-commands without further checking for
// their availability:
// btrfs check
// btrfs filesystem label
// btrfs filesystem resize
// btrfs filesystem show
// as they are all available in btrfs-progs >= 3.12.
......@@ -64,6 +65,7 @@ FS btrfs::get_filesystem_support()
fs .read_label = FS::EXTERNAL ;
fs .read_uuid = FS::EXTERNAL ;
fs.check = FS::EXTERNAL;
fs.write_label = FS::EXTERNAL;
//Resizing of btrfs requires mount, umount and kernel
// support as well as btrfs filesystem resize
......@@ -77,10 +79,6 @@ FS btrfs::get_filesystem_support()
if ( fs .read ) //needed to determine a minimum file system size.
fs .shrink = FS::EXTERNAL ;
//Test for labelling capability in btrfs command
if ( ! Utils::execute_command( "btrfs filesystem label --help", output, error, true ) )
fs .write_label = FS::EXTERNAL;
if ( ! Glib::find_program_in_path( "btrfstune" ).empty() )
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