From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGoh0-00014p-W4 for qemu-devel@nongnu.org; Thu, 20 Oct 2011 05:13:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGogw-00026G-BL for qemu-devel@nongnu.org; Thu, 20 Oct 2011 05:13:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGogw-000257-0u for qemu-devel@nongnu.org; Thu, 20 Oct 2011 05:13:34 -0400 Message-ID: <4E9FE6E0.4020703@redhat.com> Date: Thu, 20 Oct 2011 11:16:16 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1319036398-14320-1-git-send-email-pbonzini@redhat.com> <1319036398-14320-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1319036398-14320-3-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/8] vmdk: fix return values of vmdk_parent_open List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 19.10.2011 16:59, schrieb Paolo Bonzini: > While vmdk_open_desc_file (touched by the patch) correctly changed -1 > to -EINVAL, vmdk_open did not. Fix it directly in vmdk_parent_open. > > Signed-off-by: Paolo Bonzini > --- > block/vmdk.c | 11 ++++++----- > 1 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/block/vmdk.c b/block/vmdk.c > index 5d16ec4..21566eb 100644 > --- a/block/vmdk.c > +++ b/block/vmdk.c > @@ -286,7 +286,7 @@ static int vmdk_parent_open(BlockDriverState *bs) > > desc[DESC_SIZE] = '\0'; > if (bdrv_pread(bs->file, s->desc_offset, desc, DESC_SIZE) != DESC_SIZE) { > - return -1; > + return -EINVAL; > } ret = bdrv_pread(...); if (ret < 0) { return ret; } Kevin