]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Add a way to pass arbitrary mount options to fsck
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 28 Aug 2019 17:43:18 +0000 (13:43 -0400)
committerKent Overstreet <kent.overstreet@gmail.com>
Wed, 28 Aug 2019 17:43:45 +0000 (13:43 -0400)
cmd_fsck.c

index ebcf70bd856e66e55e3c9a7b8751d80d973cb8f1..e67924582799404c8259a9aeb988faa7b6126268 100644 (file)
@@ -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;