diff options
Diffstat (limited to 'c_src/cmd_image.c')
-rw-r--r-- | c_src/cmd_image.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/c_src/cmd_image.c b/c_src/cmd_image.c index 58268b4b..d00d85cf 100644 --- a/c_src/cmd_image.c +++ b/c_src/cmd_image.c @@ -477,7 +477,7 @@ static void image_create(struct bch_opt_strs fs_opt_strs, if (ret) goto err; - struct copy_fs_state s = {}; + struct copy_fs_state s = { .verbosity = verbosity }; ret = copy_fs(c, &s, src_fd, src_path) ?: finish_image(c, keep_alloc, verbosity); if (ret) @@ -635,7 +635,7 @@ static int image_update(const char *src_path, const char *dst_image, u64 input_bytes = count_input_size(src_fd); - if (truncate(dst_image, input_bytes * 2)) + if (truncate(dst_image, xstat(dst_image).st_size + input_bytes * 2)) die("truncate error: %m"); darray_const_str device_paths = {}; @@ -705,7 +705,7 @@ static int image_update(const char *src_path, const char *dst_image, goto err_stop; bch_verbose(c, "Syncing data"); - struct copy_fs_state s = {}; + struct copy_fs_state s = { .verbosity = verbosity }; ret = copy_fs(c, &s, src_fd, src_path) ?: finish_image(c, keep_alloc, verbosity); |