diff options
author | bellard | 2004-01-18 22:37:47 +0100 |
---|---|---|
committer | bellard | 2004-01-18 22:37:47 +0100 |
commit | 69e5bc90688361772120a1199e7459b8b72a9998 (patch) | |
tree | 45a0bebf55094fb95716918f97d0dd5aeaa208ad /hw/fdc.c | |
parent | fixed subtle bug: in some cases PG_DIRTY was not set correctly (diff) | |
download | qemu-69e5bc90688361772120a1199e7459b8b72a9998.tar.gz qemu-69e5bc90688361772120a1199e7459b8b72a9998.tar.xz qemu-69e5bc90688361772120a1199e7459b8b72a9998.zip |
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
Diffstat (limited to 'hw/fdc.c')
-rw-r--r-- | hw/fdc.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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... */ |