提交 69e5bc90 编写于 作者: B bellard

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
上级 c8135d9a
...@@ -788,8 +788,12 @@ static int fdctrl_transfer_handler (uint32_t addr, int size, int *irq) ...@@ -788,8 +788,12 @@ static int fdctrl_transfer_handler (uint32_t addr, int size, int *irq)
} }
if (fdctrl.data_dir != FD_DIR_WRITE) { if (fdctrl.data_dir != FD_DIR_WRITE) {
/* READ & SCAN commands */ /* READ & SCAN commands */
if (cur_drv->bs == NULL || if (cur_drv->bs == NULL) {
bdrv_read(cur_drv->bs, fd_sector(cur_drv), orig, 1) < 0) { 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", FLOPPY_DPRINTF("Floppy: error getting sector %d\n",
fd_sector(cur_drv)); fd_sector(cur_drv));
/* Sure, image size is too small... */ /* Sure, image size is too small... */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册