[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: |
Fri, 30 Sep 2016 16:33:27 +0100 |
On Tue, Sep 13, 2016 at 4:35 PM, Stefan Hajnoczi <address@hidden> 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