]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/opts.c
Update bcachefs sources to 6a25f7a00d bcachefs: fix ioctl code
[bcachefs-tools-debian] / libbcachefs / opts.c
index 1eb27ae1e2591c276cf25c636c46c7544cd1a013..b1bbf092c0d6ae27ccdb77c0419206974eb27b58 100644 (file)
@@ -181,7 +181,7 @@ int bch2_parse_mount_opts(struct bch_opts *opts, char *options)
                if (val) {
                        id = bch2_opt_lookup(name);
                        if (id < 0)
-                               return -EINVAL;
+                               continue;
 
                        ret = parse_one_opt(id, val, &v);
                        if (ret < 0)
@@ -196,8 +196,9 @@ int bch2_parse_mount_opts(struct bch_opts *opts, char *options)
                                v = 0;
                        }
 
-                       if (bch2_opt_table[id].type != BCH_OPT_BOOL)
-                               return -EINVAL;
+                       if (id < 0 ||
+                           bch2_opt_table[id].type != BCH_OPT_BOOL)
+                               continue;
                }
 
                bch2_opt_set(opts, id, v);