From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Kevin Wolf 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> Subject: [Qemu-devel] [PULL 1/5] raw-win32: Fix write request error handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@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: -- 1.8.3.1