summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-08-28 13:43:18 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2019-08-28 13:43:45 -0400
commit7f35a5202973aedc619cfe734c215faa880d178d (patch)
tree858af079331e9a657cb668be46bfd81c5a9baca5
parent92fc14824f9c1f8ce3666b11be9fab4d1739c88c (diff)
Add a way to pass arbitrary mount options to fsck
-rw-r--r--cmd_fsck.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd_fsck.c b/cmd_fsck.c
index ebcf70bd..e6792458 100644
--- a/cmd_fsck.c
+++ b/cmd_fsck.c
@@ -30,7 +30,7 @@ int cmd_fsck(int argc, char *argv[])
opt_set(opts, fsck, true);
opt_set(opts, fix_errors, FSCK_OPT_ASK);
- while ((opt = getopt(argc, argv, "apynfvh")) != -1)
+ while ((opt = getopt(argc, argv, "apynfo:vh")) != -1)
switch (opt) {
case 'a': /* outdated alias for -p */
case 'p':
@@ -46,6 +46,11 @@ int cmd_fsck(int argc, char *argv[])
case 'f':
/* force check, even if filesystem marked clean: */
break;
+ case 'o':
+ ret = bch2_parse_mount_opts(&opts, optarg);
+ if (ret)
+ return ret;
+ break;
case 'v':
opt_set(opts, verbose, true);
break;