#define E2F_OPT_WRITECHECK 0x0200
#define E2F_OPT_COMPRESS_DIRS 0x0400
#define E2F_OPT_FRAGCHECK 0x0800
-#define E2F_OPT_DISCARD 0x1000
+#define E2F_OPT_JOURNAL_ONLY 0x1000 /* only replay the journal */
++#define E2F_OPT_DISCARD 0x2000
/*
* E2fsck flags
} else if (strcmp(token, "fragcheck") == 0) {
ctx->options |= E2F_OPT_FRAGCHECK;
continue;
+ } else if (strcmp(token, "journal_only") == 0) {
+ if (arg) {
+ extended_usage++;
+ continue;
+ }
+ ctx->options |= E2F_OPT_JOURNAL_ONLY;
+ } else if (strcmp(token, "discard") == 0) {
+ ctx->options |= E2F_OPT_DISCARD;
+ continue;
+ } else if (strcmp(token, "nodiscard") == 0) {
+ ctx->options &= ~E2F_OPT_DISCARD;
+ continue;
} else {
fprintf(stderr, _("Unknown extended option: %s\n"),
token);
"Valid extended options are:\n"), stderr);
fputs(("\tea_ver=<ea_version (1 or 2)>\n"), stderr);
fputs(("\tfragcheck\n"), stderr);
+ fputs(("\tjournal_only\n"), stderr);
+ fputs(("\tdiscard\n"), stderr);
+ fputs(("\tnodiscard\n"), stderr);
fputc('\n', stderr);
exit(1);
}