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
This commit is contained in:
Mike Fleetwood 2019-03-19 20:02:15 +00:00
parent 66a20ae9fa
commit afbf56c1c2
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}