On Tue, Sep 13, 2016 at 4:35 PM, Stefan Hajnoczi <[email protected]> wrote: > 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?
Ping
