Skip to content

Commit

Permalink
raw-win32.c: Fix incorrect handling behaviour of small block files
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
  • Loading branch information
Tal Kain authored and kevmw committed Sep 12, 2013
1 parent 1ebf561 commit 56e023a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/raw-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 56e023a

Please sign in to comment.