fsck.f2fs: allow -p without value
PATCH 1/1 fsck.f2fs: allow -p without value
This patch allows -p without value.
Suggested-by Pavol Cupka <[email protected]>
Signed-off-by Jaegeuk Kim <[email protected]>
--- fsck/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
fsck/main.c +4 -4
@@ -184,13 +184,13 @@ void f2fs_parse_options(int argc, char *argv[])* 0: default level, the same as -a * 1: check meta */ -if (optarg[0 ] =='-' ) { +if (optarg[0 ] =='-' || !is_digits (optarg) || + optind == argc) { +MSG (0 ,"Info: Use default preen mode\n" ); c.preen_mode =PREEN_MODE_0 ; + c.auto_fix =1 ; optind--;break ; - }else if (!is_digits (optarg)) { - err =EWRONG_OPT ; -break ; } c.preen_mode =atoi (optarg);if (c.preen_mode <0 )
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 4 lines · Jaegeuk Kim
This patch allows -p without value.
Suggested-by Pavol Cupka <[email protected]>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