fsck.f2fs: add -y for generic fsck
PATCH 1/1 fsck.f2fs: add -y for generic fsck
-y is same as -f, which fixes any corruption all the time.
Signed-off-by Jaegeuk Kim <[email protected]>
--- fsck/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fsck/main.c +3 -1
@@ -57,6 +57,7 @@ void fsck_usage()MSG (0 ," -S sparse_mode\n" );MSG (0 ," -t show directory tree\n" );MSG (0 ," -q preserve quota limits\n" ); +MSG (0 ," -y fix all the time\n" );MSG (0 ," --dry-run do not really fix corruptions\n" );exit (1 ); }
@@ -159,7 +160,7 @@ void f2fs_parse_options(int argc, char *argv[]) }if (!strcmp ("fsck.f2fs" , prog)) { -const char *option_string =":ad:fp:q:St" ; +const char *option_string =":ad:fp:q:Sty" ;int opt =0 ;struct option long_opt[] = { {"dry-run" , no_argument,0 ,1 },
@@ -213,6 +214,7 @@ void f2fs_parse_options(int argc, char *argv[])MSG (0 ,"Info: Debug level = %d\n" , c.dbg_lv);break ;case 'f' : +case 'y' : c.fix_on =1 ;MSG (0 ,"Info: Force to fix corruption\n" );break ;
Signature · 6 lines
2.15.0.531.g2ccb3012c9-goog ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Quoted 3 lines · Jaegeuk Kim
-y is same as -f, which fixes any corruption all the time.
Signed-off-by Jaegeuk Kim <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot