From patchwork Fri Oct 2 12:50:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 525512 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42676140307 for ; Fri, 2 Oct 2015 23:31:48 +1000 (AEST) Received: from localhost ([::1]:59687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi0R7-0003F3-DM for incoming@patchwork.ozlabs.org; Fri, 02 Oct 2015 09:31:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhzno-0006wq-W8 for qemu-devel@nongnu.org; Fri, 02 Oct 2015 08:51:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zhzno-0003NO-3w for qemu-devel@nongnu.org; Fri, 02 Oct 2015 08:51:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhznk-0003Ls-7G; Fri, 02 Oct 2015 08:51:04 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id CC27FC075D95; Fri, 2 Oct 2015 12:51:03 +0000 (UTC) Received: from noname.redhat.com (ovpn-116-114.ams2.redhat.com [10.36.116.114]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t92Cp08X011380; Fri, 2 Oct 2015 08:51:02 -0400 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 2 Oct 2015 14:50:54 +0200 Message-Id: <1443790258-23305-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1443790258-23305-1-git-send-email-kwolf@redhat.com> References: <1443790258-23305-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 1/5] raw-win32: Fix write request error handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org aio_worker() wrote the return code to the wrong variable. Signed-off-by: Kevin Wolf Tested-by: Guangmu Zhu Reviewed-by: Eric Blake --- block/raw-win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/raw-win32.c b/block/raw-win32.c index 68f2338..b562c94 100644 --- a/block/raw-win32.c +++ b/block/raw-win32.c @@ -119,9 +119,9 @@ static int aio_worker(void *arg) case QEMU_AIO_WRITE: count = handle_aiocb_rw(aiocb); if (count == aiocb->aio_nbytes) { - count = 0; + ret = 0; } else { - count = -EINVAL; + ret = -EINVAL; } break; case QEMU_AIO_FLUSH: