diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-23 11:03:42 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-23 11:03:42 -0400 |
commit | b8435c569398fbc8a4a209dcd55cb660b6577d3d (patch) | |
tree | 2fdb2d6b5a29a30e467155a4a8c43661e34e2fcd /c_src/cmd_format.c | |
parent | 80d0a21ed36e00c795bf27b582ee3b626de0a3c5 (diff) |
bch2_format() now takes a darray of dev_opts
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'c_src/cmd_format.c')
-rw-r--r-- | c_src/cmd_format.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/c_src/cmd_format.c b/c_src/cmd_format.c index 4fbf3a4b..7c0d1920 100644 --- a/c_src/cmd_format.c +++ b/c_src/cmd_format.c @@ -126,8 +126,8 @@ void build_fs(struct bch_fs *c, const char *src_path) int cmd_format(int argc, char *argv[]) { - DARRAY(struct dev_opts) devices = { 0 }; - DARRAY(char *) device_paths = { 0 }; + dev_opts_list devices = {}; + darray_str device_paths = {}; struct format_opts opts = format_opts_default(); struct dev_opts dev_opts = dev_opts_default(); bool force = false, no_passphrase = false, quiet = false, initialize = true, verbose = false; @@ -277,11 +277,7 @@ int cmd_format(int argc, char *argv[]) die("Error opening %s: %s", dev_opts.path, strerror(-ret)); } - struct bch_sb *sb = - bch2_format(fs_opt_strs, - fs_opts, - opts, - devices.data, devices.nr); + struct bch_sb *sb = bch2_format(fs_opt_strs, fs_opts, opts, devices); bch2_opt_strs_free(&fs_opt_strs); if (!quiet) { |