[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v5] qemu-img: change opening method for the outp
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH v5] qemu-img: change opening method for the output in dd |
Date: |
Tue, 13 Sep 2016 16:35:18 +0100 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
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 needs to
support protocols like iSCSI and ssh.
The only way to test for the existence of a disk image is by opening it
with block layer APIs.
Can you just move the img_open() call from the else statement up here
instead?
signature.asc
Description: PGP signature
- Re: [Qemu-block] [PATCH v5] qemu-img: change opening method for the output in dd,
Stefan Hajnoczi <=