[gparted] Replace use of deprecated btrfsck (!26)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Replace use of deprecated btrfsck (!26)
- Date: Fri, 15 Mar 2019 17:38:33 +0000 (UTC)
commit 05d9919afac1a94fe063022979b0408d0d036a3f
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Mon Mar 11 21:52:38 2019 +0000
Replace use of deprecated btrfsck (!26)
In btrfs-progs 3.12, btrfsck is a hard link to the multi-tool btrfs
executable. When run as 'btrfsck' it just implements 'btrfs check'
[1][2][3][4].
In btrfs-progs 3.14.2 the btrfsck man page is re-added as a symlink to
the btrfs-check man page and reports that btrfsck is deprecated [5].
Therefore replace use of 'btrfsck' with 'btrfs check'.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git/commit/?id=fac45410e9a783c187ae83d993d3bf3350d05149
Btrfs-progs: Rename btrfsck.c -> cmds-check.c
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git/commit/?id=5956f752c66d5259bbb17a2dd47ee8c8cc0e5f4f
Btrfs-progs: add btrfsck functionality to btrfs
[3]
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git/commit/?id=d5d2046ae3b216af22a8a37c940f2412ba519b6e
Btrfs-progs: add btrfsck name detection to btrfs
[4]
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git/commit/?id=e31f6172aa1d6ec5d562f56086819a0f4bc8a914
btrfs-progs: build btrsfck to keep compatibility
[5]
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git/commit/?id=fddeecb7d424d5bb1a93a19a5e537057a4a7f597
btrfs-progs: doc: link btrfsck to btrfs-check
Closes !26 - Remove support for btrfs-progs < 3.12
src/btrfs.cc | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/btrfs.cc b/src/btrfs.cc
index 5e679ec3..fd4c77d7 100644
--- a/src/btrfs.cc
+++ b/src/btrfs.cc
@@ -51,18 +51,19 @@ FS btrfs::get_filesystem_support()
fs.create_with_label = FS::EXTERNAL;
}
- if ( ! Glib::find_program_in_path( "btrfsck" ) .empty() )
- fs.check = FS::EXTERNAL;
-
if (! Glib::find_program_in_path("btrfs").empty())
{
- //Use newer btrfs multi-tool control command. No need
- // to test for filesystem show and filesystem resize
- // sub-commands as they were always included.
+ // Use these btrfs multi-tool sub-commands without further checking for
+ // their availability:
+ // btrfs check
+ // btrfs filesystem resize
+ // btrfs filesystem show
+ // as they are all available in btrfs-progs >= 3.12.
fs.read = FS::EXTERNAL;
fs .read_label = FS::EXTERNAL ;
fs .read_uuid = FS::EXTERNAL ;
+ fs.check = FS::EXTERNAL;
//Resizing of btrfs requires mount, umount and kernel
// support as well as btrfs filesystem resize
@@ -131,8 +132,8 @@ bool btrfs::create( const Partition & new_partition, OperationDetail & operation
bool btrfs::check_repair( const Partition & partition, OperationDetail & operationdetail )
{
- return ! execute_command( "btrfsck " + Glib::shell_quote( partition.get_path() ),
- operationdetail, EXEC_CHECK_STATUS );
+ return ! execute_command("btrfs check " + Glib::shell_quote(partition.get_path()),
+ operationdetail, EXEC_CHECK_STATUS);
}
void btrfs::set_used_sectors( Partition & partition )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]