From 5d555030ba10ef3be12cd75a121a7cd5f6ef9bd2 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 23 Sep 2015 14:58:21 +0200 Subject: [PATCH] raw-win32: Fix write request error handling 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: -- 2.7.4