mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-10 00:00:24 +03:00
cmd_image_update: Fix truncate call at the start of update
Some checks failed
build / bcachefs-tools-deb (ubuntu-22.04) (push) Has been cancelled
build / bcachefs-tools-deb (ubuntu-24.04) (push) Has been cancelled
build / bcachefs-tools-rpm (push) Has been cancelled
build / bcachefs-tools-msrv (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Some checks failed
build / bcachefs-tools-deb (ubuntu-22.04) (push) Has been cancelled
build / bcachefs-tools-deb (ubuntu-24.04) (push) Has been cancelled
build / bcachefs-tools-rpm (push) Has been cancelled
build / bcachefs-tools-msrv (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
We don't want to make the image smaller until we've finished updating. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
e1e87f53cd
commit
5f92627783
@ -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 = {};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user