From 7f35a5202973aedc619cfe734c215faa880d178d Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 28 Aug 2019 13:43:18 -0400 Subject: [PATCH] Add a way to pass arbitrary mount options to fsck --- cmd_fsck.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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;