From: Kevin Wolf Date: Wed, 23 Sep 2015 12:58:21 +0000 (+0200) Subject: raw-win32: Fix write request error handling X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5d555030ba10ef3be12cd75a121a7cd5f6ef9bd2;p=qemu.git 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 --- diff --git a/block/raw-win32.c b/block/raw-win32.c index 68f2338acc..b562c94dad 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: