diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-28 14:50:43 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-28 15:31:43 -0400 |
commit | 6d7b47685b2625e3103e26a25c8003ef6de5f82d (patch) | |
tree | 421b388c1e90e45d7f653bf502c0858426b8d625 /c_src/cmd_format.c | |
parent | 0589d9f3c3cdff28a13f9efc96762d39ef615d22 (diff) |
Update bcachefs sources to f0ebca18293c bcachefs: bch2_fs_open() now takes a darray
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 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/c_src/cmd_format.c b/c_src/cmd_format.c index ac48454f..aa87feb0 100644 --- a/c_src/cmd_format.c +++ b/c_src/cmd_format.c @@ -123,7 +123,7 @@ static void build_fs(struct bch_fs *c, const char *src_path) int cmd_format(int argc, char *argv[]) { dev_opts_list devices = {}; - darray_str device_paths = {}; + darray_const_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; @@ -302,9 +302,8 @@ int cmd_format(int argc, char *argv[]) * Start the filesystem once, to allocate the journal and create * the root directory: */ - struct bch_fs *c = bch2_fs_open(device_paths.data, - device_paths.nr, - bch2_opts_empty()); + struct bch_opts open_opts = bch2_opts_empty(); + struct bch_fs *c = bch2_fs_open(&device_paths, &open_opts); if (IS_ERR(c)) die("error opening %s: %s", device_paths.data[0], bch2_err_str(PTR_ERR(c))); |