From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlHq7-0000mm-5L for qemu-devel@nongnu.org; Mon, 03 Nov 2014 08:38:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlHq2-0001mB-9e for qemu-devel@nongnu.org; Mon, 03 Nov 2014 08:38:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlHq2-0001m5-1r for qemu-devel@nongnu.org; Mon, 03 Nov 2014 08:38:30 -0500 Date: Mon, 3 Nov 2014 14:38:22 +0100 From: Kevin Wolf Message-ID: <20141103133822.GD22901@noname.str.redhat.com> References: <1414413009-9008-1-git-send-email-mreitz@redhat.com> <20141029104257.GE19774@stefanha-thinkpad.redhat.com> <54577632.5050204@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54577632.5050204@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] block: Propagate error in bdrv_img_create() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Stefan Hajnoczi , Peter Lieven , qemu-devel@nongnu.org, Stefan Hajnoczi Am 03.11.2014 um 13:33 hat Max Reitz geschrieben: > On 2014-10-29 at 11:42, Stefan Hajnoczi wrote: > >On Mon, Oct 27, 2014 at 01:30:07PM +0100, Max Reitz wrote: > >>Currently, when trying to create a backed image without specifying its > >>size, when the backing file does not exist or is not accessible, an > >>appropriate error message will be generated which is then (in > >>bdrv_img_create()) prefixed with the image file name and the strerror(). > >>However, both are generally already part of the bdrv_open() error > >>message, so we should not double this information. An example: > >> > >>$ qemu-img create -f qcow2 -b /tmp/enoent /tmp/img.qcow2 > >>qemu-img: /tmp/img.qcow2: Could not open '/tmp/enoent': Could not open > >>'/tmp/enoent': No such file or directory: No such file or directory > >> > >>Just propagating the error is sufficient: > >> > >>$ qemu-img create -f qcow2 -b /tmp/enoent /tmp/img.qcow2 > >>qemu-img /tmp/img.qcow2: Could not open '/tmp/enoent': No such file or > >>directory > >> > >> > >>Max Reitz (2): > >> block: Propagate error in bdrv_img_create() > >> iotests: Add test for non-existing backing file > >> > >> block.c | 5 ----- > >> tests/qemu-iotests/111 | 53 ++++++++++++++++++++++++++++++++++++++++++++++ > >> tests/qemu-iotests/111.out | 3 +++ > >> tests/qemu-iotests/group | 1 + > >> 4 files changed, 57 insertions(+), 5 deletions(-) > >> create mode 100755 tests/qemu-iotests/111 > >> create mode 100644 tests/qemu-iotests/111.out > >Eric: Leaving "inexistent". It is in several dictionaries besides > >Wiktionary :). > > > >Thanks, applied to my block tree: > >https://github.com/stefanha/qemu/commits/block > > Did you really? It appears neither there nor did it in your pull request... Looks like it's missing indeed. Applied to my tree then. Kevin