From 32df1de163f7548942fd3ab335013905f250b4b2 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sat, 19 May 2018 09:40:19 +0100 Subject: [PATCH] Move the xfs_db -r flag to the start when reading XFS usage I completely missed that when reading XFS file system size and usage it was using the '-r' read-only flag to xfs_db because it was at the end of the string on the following line of code. Move it to the start of the xfs_db command line, like it is when reading the file system label. --- src/xfs.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xfs.cc b/src/xfs.cc index 11f590ed..f7ec8d38 100644 --- a/src/xfs.cc +++ b/src/xfs.cc @@ -88,8 +88,8 @@ FS xfs::get_filesystem_support() void xfs::set_used_sectors( Partition & partition ) { - if ( ! Utils::execute_command( "xfs_db -c 'sb 0' -c 'print blocksize' -c 'print dblocks'" - " -c 'print fdblocks' -r " + Glib::shell_quote( partition.get_path() ), + if ( ! Utils::execute_command( "xfs_db -r -c 'sb 0' -c 'print blocksize' -c 'print dblocks'" + " -c 'print fdblocks' " + Glib::shell_quote( partition.get_path() ), output, error, true ) ) { //blocksize