aboutsummaryrefslogtreecommitdiff
path: root/block/raw-win32.c
diff options
context:
space:
mode:
authorTal Kain <tal.kain@ravellosystems.com>2013-09-09 11:14:55 +0200
committerKevin Wolf <kwolf@redhat.com>2013-09-12 10:12:46 +0200
commit56e023af805215260c71d44f5b5a98087f4920d2 (patch)
treedc23c2e610947a0185751184d8212e849b333a64 /block/raw-win32.c
parent1ebf561c11302f4fbe4afdd82758fe053cf1d5fc (diff)
downloadqemu-56e023af805215260c71d44f5b5a98087f4920d2.zip
qemu-56e023af805215260c71d44f5b5a98087f4920d2.tar.gz
qemu-56e023af805215260c71d44f5b5a98087f4920d2.tar.bz2
raw-win32.c: Fix incorrect handling behaviour of small block files
It is a valid case that the read data's size is smaller than the requested size since there could be files that are smaller than the minimum block size (For ex. when a VMDK disk descriptor file) Signed-off-by: Tal Kain <tal.kain@ravellosystems.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r--block/raw-win32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c
index d2d2d9f..ff3c5ea 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -85,6 +85,7 @@ static size_t handle_aiocb_rw(RawWin32AIOData *aiocb)
ret_count = 0;
}
if (ret_count != len) {
+ offset += ret_count;
break;
}
offset += len;