From: bellard Date: Sun, 18 Jan 2004 21:37:47 +0000 (+0000) Subject: generate read error if no image (win XP install boot) X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=69e5bc90688361772120a1199e7459b8b72a9998;p=qemu.git generate read error if no image (win XP install boot) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@548 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/hw/fdc.c b/hw/fdc.c index a47b809b44..ec4fa72275 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -788,8 +788,12 @@ static int fdctrl_transfer_handler (uint32_t addr, int size, int *irq) } if (fdctrl.data_dir != FD_DIR_WRITE) { /* READ & SCAN commands */ - if (cur_drv->bs == NULL || - bdrv_read(cur_drv->bs, fd_sector(cur_drv), orig, 1) < 0) { + if (cur_drv->bs == NULL) { + fdctrl_stop_transfer(0x40, 0x00, 0x00); + goto transfer_error; + } + + if (bdrv_read(cur_drv->bs, fd_sector(cur_drv), orig, 1) < 0) { FLOPPY_DPRINTF("Floppy: error getting sector %d\n", fd_sector(cur_drv)); /* Sure, image size is too small... */