Skip to contentSkip to conversation

fsck.f2fs: add -y for generic fsck

PATCH In review Jaegeuk Kim 2 participants 2 messages Dec 29, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsck.f2fs: add -y for generic fsck

-y is same as -f, which fixes any corruption all the time.

---
 fsck/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fsck/main.c +3 -1
index db5c413..f35d01d 100644
@@ -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