diff options
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/core.c | 4 | ||||
-rw-r--r-- | hw/ide/via.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index af52c2c..e20f2e7 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2630,6 +2630,10 @@ int ide_init_drive(IDEState *s, BlockDriverState *bs, s->drive_kind = IDE_CD; bdrv_set_change_cb(bs, cdrom_change_cb, s); } else { + if (!bdrv_is_inserted(s->bs)) { + error_report("Device needs media, but drive is empty"); + return -1; + } if (bdrv_is_read_only(bs)) { error_report("Can't use a read-only drive"); return -1; diff --git a/hw/ide/via.c b/hw/ide/via.c index a403e8c..b2c7cad 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -150,7 +150,6 @@ static int vt82c686b_ide_initfn(PCIDevice *dev) pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_IDE); pci_config_set_prog_interface(pci_conf, 0x8a); /* legacy ATA mode */ pci_config_set_revision(pci_conf,0x06); /* Revision 0.6 */ - pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; /* header_type */ pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); qemu_register_reset(via_reset, d); |