diff options
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/core.c | 1 | ||||
-rw-r--r-- | hw/ide/piix.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index 40abc1edd2..428f033876 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1890,6 +1890,7 @@ void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0, error_report("Can't set up IDE drive %s", dinfo->id); exit(1); } + bdrv_attach_dev_nofail(dinfo->bdrv, &bus->ifs[i]); } else { ide_reset(&bus->ifs[i]); } diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 8525336075..b9cdcd6b75 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -177,9 +177,9 @@ static int pci_piix3_xen_ide_unplug(DeviceState *dev) for (; i < 3; i++) { di = drive_get_by_index(IF_IDE, i); if (di != NULL && di->bdrv != NULL && !di->bdrv->removable) { - DeviceState *ds = bdrv_get_attached(di->bdrv); + DeviceState *ds = bdrv_get_attached_dev(di->bdrv); if (ds) { - bdrv_detach(di->bdrv, ds); + bdrv_detach_dev(di->bdrv, ds); } bdrv_close(di->bdrv); pci_ide->bus[di->bus].ifs[di->unit].bs = NULL; |