Index: block.c =================================================================== RCS file: /cvsroot/qemu/qemu/block.c,v retrieving revision 1.12 diff -u -p -5 -r1.12 block.c --- block.c 3 Aug 2004 21:14:09 -0000 1.12 +++ block.c 5 Aug 2004 09:03:15 -0000 @@ -534,11 +534,11 @@ static int raw_read(BlockDriverState *bs BDRVRawState *s = bs->opaque; int ret; lseek(s->fd, sector_num * 512, SEEK_SET); ret = read(s->fd, buf, nb_sectors * 512); - if (ret != nb_sectors * 512) + if (ret == -1) return -1; return 0; } static int raw_write(BlockDriverState *bs, int64_t sector_num,