Received: from eggs.gnu.org ([2001:4830:134:3::10]:54105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj5sV-0002FZ-Lx for qemu-devel@nongnu.org; Tue, 28 Oct 2014 08:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xj5sP-0000gr-Hs for qemu-devel@nongnu.org; Tue, 28 Oct 2014 08:27:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj5sP-0000ft-BL for qemu-devel@nongnu.org; Tue, 28 Oct 2014 08:27:53 -0400 Date: Tue, 28 Oct 2014 13:27:45 +0100 From: Kevin Wolf Message-ID: <20141028122745.GB4828@noname.str.redhat.com> References: <1414413009-9008-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1414413009-9008-1-git-send-email-mreitz@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: Peter Lieven , qemu-devel@nongnu.org, Stefan Hajnoczi Am 27.10.2014 um 13:30 hat Max Reitz geschrieben: > 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 Reviewed-by: Kevin Wolf