X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libbcachefs%2Fopts.c;h=b1bbf092c0d6ae27ccdb77c0419206974eb27b58;hb=38f22164a9a3f2f8e33af8e0cc3ce4f17ef99cde;hp=1eb27ae1e2591c276cf25c636c46c7544cd1a013;hpb=914c4d19ed4a1c64268c4c23609c43d3d6765969;p=bcachefs-tools-debian diff --git a/libbcachefs/opts.c b/libbcachefs/opts.c index 1eb27ae..b1bbf09 100644 --- a/libbcachefs/opts.c +++ b/libbcachefs/opts.c @@ -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);