summaryrefslogtreecommitdiff
path: root/libbcachefs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-03-21 02:10:28 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-03-21 02:13:02 -0400
commit74148a8ee52526c44752f1773365963f18734ac9 (patch)
tree25ccc19dab308fedcfb3fabdc955ecca2d2dc542 /libbcachefs.c
parente76dbf1abd4472fa26c85f4b30e213d8768ccf64 (diff)
Update bcachefs sources to 0e705f5944 fixup! bcachefs: Refactor bch2_btree_node_mem_alloc()
Diffstat (limited to 'libbcachefs.c')
-rw-r--r--libbcachefs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libbcachefs.c b/libbcachefs.c
index 1c780be1..ceca4286 100644
--- a/libbcachefs.c
+++ b/libbcachefs.c
@@ -597,6 +597,7 @@ next:
struct bch_opts bch2_parse_opts(struct bch_opt_strs strs)
{
struct bch_opts opts = bch2_opts_empty();
+ struct printbuf err = PRINTBUF;
unsigned i;
int ret;
u64 v;
@@ -606,17 +607,16 @@ struct bch_opts bch2_parse_opts(struct bch_opt_strs strs)
bch2_opt_table[i].type == BCH_OPT_FN)
continue;
- ret = bch2_opt_parse(NULL, "option",
+ ret = bch2_opt_parse(NULL,
&bch2_opt_table[i],
- strs.by_id[i], &v);
+ strs.by_id[i], &v, &err);
if (ret < 0)
- die("Invalid %s: %s",
- bch2_opt_table[i].attr.name,
- strerror(-ret));
+ die("Invalid option %s", err.buf);
bch2_opt_set_by_id(&opts, i, v);
}
+ printbuf_exit(&err);
return opts;
}