aboutsummaryrefslogtreecommitdiff
path: root/hw/pci/pci-hotplug-old.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci/pci-hotplug-old.c')
-rw-r--r--hw/pci/pci-hotplug-old.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/pci/pci-hotplug-old.c b/hw/pci/pci-hotplug-old.c
index d87c469..6ab28b7 100644
--- a/hw/pci/pci-hotplug-old.c
+++ b/hw/pci/pci-hotplug-old.c
@@ -77,7 +77,7 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
monitor_printf(mon, "Invalid PCI device address %s\n", devaddr);
return NULL;
}
- if (!((BusState*)bus)->allow_hotplug) {
+ if (!qbus_is_hotpluggable(BUS(bus))) {
monitor_printf(mon, "PCI bus doesn't support hotplug\n");
return NULL;
}
@@ -227,7 +227,7 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
monitor_printf(mon, "Invalid PCI device address %s\n", devaddr);
return NULL;
}
- if (!((BusState*)bus)->allow_hotplug) {
+ if (!qbus_is_hotpluggable(BUS(bus))) {
monitor_printf(mon, "PCI bus doesn't support hotplug\n");
return NULL;
}