On Fri, Aug 26, 2016 at 09:19:40AM +0200, Reda Sallahi wrote:
> -blk2 = img_open(image_opts, out.filename, out_fmt, BDRV_O_RDWR,
> -false, false);
> +ret = access(out_filename, F_OK); /* Check if file exists */
The QEMU block layer does not use POSIX file I/O because it
The subcommand dd was creating an output image regardless of whether there
was one already created. With this patch we try to check first if the output
image exists and resize it if necessary.
We also make it mandatory to specify conv=notrunc when the file already
exists.
Signed-off-by: Reda Sall