summaryrefslogtreecommitdiffstats
path: root/block/raw-win32.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2015-09-23 14:58:21 +0200
committerKevin Wolf <kwolf@redhat.com>2015-10-02 13:48:29 +0200
commit5d555030ba10ef3be12cd75a121a7cd5f6ef9bd2 (patch)
tree78a8f8f166901041c8dde7cd880625c01eff864e /block/raw-win32.c
parentff770b07f34d28b79013a83989bd6c85f8f16b2f (diff)
downloadhqemu-5d555030ba10ef3be12cd75a121a7cd5f6ef9bd2.zip
hqemu-5d555030ba10ef3be12cd75a121a7cd5f6ef9bd2.tar.gz
raw-win32: Fix write request error handling
aio_worker() wrote the return code to the wrong variable. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Tested-by: Guangmu Zhu <guangmuzhu@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r--block/raw-win32.c4
1 files 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:
OpenPOWER on IntegriCloud