From 56e023af805215260c71d44f5b5a98087f4920d2 Mon Sep 17 00:00:00 2001 From: Tal Kain Date: Mon, 9 Sep 2013 11:14:55 +0200 Subject: 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 Signed-off-by: Kevin Wolf --- block/raw-win32.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block/raw-win32.c') diff --git a/block/raw-win32.c b/block/raw-win32.c index d2d2d9f4d4..ff3c5ea0d7 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; -- cgit v1.2.1