From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf2bv-00049j-Lr for qemu-devel@nongnu.org; Thu, 24 Sep 2015 05:14:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf2bu-0007o6-Sy for qemu-devel@nongnu.org; Thu, 24 Sep 2015 05:14:39 -0400 From: Kevin Wolf Date: Thu, 24 Sep 2015 11:14:27 +0200 Message-Id: <1443086067-8209-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH] 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, guangmuzhu@gmail.com aio_worker() wrote the return code to the wrong variable. Signed-off-by: Kevin Wolf Tested-by: Guangmu Zhu --- 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