[gparted] Drop fsck.f2fs -y option not available before f2fs-tools 1.10.0 (!29)



commit afbf56c1c2448933dc0f27af30d28d13f8d3dffe
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Tue Mar 19 20:02:15 2019 +0000

    Drop fsck.f2fs -y option not available before f2fs-tools 1.10.0 (!29)
    
    On CentOS 7 with f2fs-tools 1.4.1, checking an F2FS file system fails
    like this:
        # fsck.f2fs -f -y -a /dev/sdb3
        Info: Force to fix corruption
        fsck.f2fs: invalid option -- 'y'
                Error: Unknown option ?
    
        Usage: fsck.f2fs [options] device
        [options]:
          -a check/fix potential corruption, reported by f2fs
          -d debug level default:0]
          -f check/fix entire partition
          -t show directory tree [-d -1]
        # echo $?
        1
    
    Turns out that the '-y' option was not available until f2fs-tools 1.10.0
    and is identical to the existing '-f' option anyway [1], which GParted
    already uses.  Just remove the '-y' option passed to fsck.f2fs.
    
    [1] 
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?id=55ee9e7202f84168f868d863da8ed1c4995a0e6d
        fsck.f2fs: add -y for generic fsck
    
    Closes !29 - Enhance F2FS support

 src/f2fs.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/f2fs.cc b/src/f2fs.cc
index 7ef62bd4..a3b70061 100644
--- a/src/f2fs.cc
+++ b/src/f2fs.cc
@@ -141,7 +141,7 @@ bool f2fs::resize(const Partition & partition_new, OperationDetail & operationde
 
 bool f2fs::check_repair(const Partition & partition, OperationDetail & operationdetail)
 {
-       return ! execute_command("fsck.f2fs -f -y -a " + Glib::shell_quote(partition.get_path()),
+       return ! execute_command("fsck.f2fs -f -a " + Glib::shell_quote(partition.get_path()),
                                 operationdetail, EXEC_CHECK_STATUS|EXEC_CANCEL_SAFE);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]