From bcbbd234d42f1111e42b91376db61922d42e7e9e Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 16 Jan 2013 21:19:59 +0100 Subject: win32-aio: Fix vectored reads Copying data in the right direction really helps a lot! Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/win32-aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/win32-aio.c b/block/win32-aio.c index 03833700b4..e4b7b75d29 100644 --- a/block/win32-aio.c +++ b/block/win32-aio.c @@ -84,7 +84,7 @@ static void win32_aio_process_completion(QEMUWin32AIOState *s, int i; for (i = 0; i < qiov->niov; ++i) { - memcpy(p, qiov->iov[i].iov_base, qiov->iov[i].iov_len); + memcpy(qiov->iov[i].iov_base, p, qiov->iov[i].iov_len); p += qiov->iov[i].iov_len; } qemu_vfree(waiocb->buf); -- cgit v1.2.3