aboutsummaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2014-09-26 09:28:17 +0000
committerAndreas Färber <afaerber@suse.de>2014-10-15 05:03:13 +0200
commit39b888bd88296b178082b5a2e4c6e82fcbd877f8 (patch)
treec5fac970065e85e7fa65d81f64e3ef1271555cc7 /qdev-monitor.c
parent49cec38591d6fef833cf12873fb4ff9748d0f08b (diff)
Access BusState::allow_hotplug using wraper qbus_is_hotpluggable()
It would allow to transparently switch detection whether Bus is hotpluggable from allow_hotplug field to hotplug_handler link and to drop allow_hotplug field once all users are converted to hotplug handler API. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 5ec66067f5..f6db461476 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -515,7 +515,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
return NULL;
}
}
- if (qdev_hotplug && bus && !bus->allow_hotplug) {
+ if (qdev_hotplug && bus && !qbus_is_hotpluggable(bus)) {
qerror_report(QERR_BUS_NO_HOTPLUG, bus->name);
return NULL;
}