summaryrefslogtreecommitdiff
path: root/c_src/cmd_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'c_src/cmd_device.c')
-rw-r--r--c_src/cmd_device.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/c_src/cmd_device.c b/c_src/cmd_device.c
index 96c25310..cb40dcea 100644
--- a/c_src/cmd_device.c
+++ b/c_src/cmd_device.c
@@ -515,7 +515,11 @@ static int cmd_device_resize(int argc, char *argv[])
} else {
printf("Doing offline resize of %s\n", dev);
- struct bch_fs *c = bch2_fs_open(&dev, 1, bch2_opts_empty());
+ darray_const_str devs = {};
+ darray_push(&devs, dev);
+
+ struct bch_opts opts = bch2_opts_empty();
+ struct bch_fs *c = bch2_fs_open(&devs, &opts);
if (IS_ERR(c))
die("error opening %s: %s", dev, bch2_err_str(PTR_ERR(c)));
@@ -612,7 +616,11 @@ static int cmd_device_resize_journal(int argc, char *argv[])
} else {
printf("%s is offline - starting:\n", dev);
- struct bch_fs *c = bch2_fs_open(&dev, 1, bch2_opts_empty());
+ darray_const_str devs = {};
+ darray_push(&devs, dev);
+
+ struct bch_opts opts = bch2_opts_empty();
+ struct bch_fs *c = bch2_fs_open(&devs, &opts);
if (IS_ERR(c))
die("error opening %s: %s", dev, bch2_err_str(PTR_ERR(c)));