From: Jaegeuk Kim Date: Fri, 23 Oct 2015 21:03:29 +0000 (-0700) Subject: fsck.f2fs: support a preen mode X-Git-Tag: v1.5.0~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5489249c23e00b775286d6f6d6df38b8614a30e9;p=platform%2Fupstream%2Ff2fs-tools.git fsck.f2fs: support a preen mode Generic fsck uses -p, preen mode, and fsck.f2fs can support it as -a for now. Signed-off-by: Jaegeuk Kim --- diff --git a/fsck/main.c b/fsck/main.c index b5ad46e..844ee8a 100644 --- a/fsck/main.c +++ b/fsck/main.c @@ -20,6 +20,7 @@ void fsck_usage() MSG(0, " -a check/fix potential corruption, reported by f2fs\n"); MSG(0, " -d debug level [default:0]\n"); MSG(0, " -f check/fix entire partition\n"); + MSG(0, " -p preen mode [default is same as -a]\n"); MSG(0, " -t show directory tree [-d -1]\n"); exit(1); } @@ -43,12 +44,13 @@ void f2fs_parse_options(int argc, char *argv[]) char *prog = basename(argv[0]); if (!strcmp("fsck.f2fs", prog)) { - const char *option_string = "ad:ft"; + const char *option_string = "ad:fpt"; config.func = FSCK; while ((option = getopt(argc, argv, option_string)) != EOF) { switch (option) { case 'a': + case 'p': config.auto_fix = 1; MSG(0, "Info: Fix the reported corruption.\n"); break;