From 6d7b47685b2625e3103e26a25c8003ef6de5f82d Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 28 Apr 2025 14:50:43 -0400 Subject: Update bcachefs sources to f0ebca18293c bcachefs: bch2_fs_open() now takes a darray Signed-off-by: Kent Overstreet --- c_src/cmd_format.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'c_src/cmd_format.c') 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))); -- cgit v1.2.3