floppy read of incomplete sectors
The same issue of two weeks ago, causing some apps to fail because the last sector is not being read if the file serving as floppy image is not a multiple of 512 bytes.
The patch is against CVS, the new raw_block code.
Jani
Index: block.c
===================================================================
RCS file: /cvsroot/qemu/qemu/block.c,v
retrieving revision 1.12
block.c +1 -1
@@ -534,11 +534,11 @@ static int raw_read(BlockDriverState *bsBDRVRawState *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,