From 39b888bd88296b178082b5a2e4c6e82fcbd877f8 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Fri, 26 Sep 2014 09:28:17 +0000 Subject: Access BusState::allow_hotplug using wraper qbus_is_hotpluggable() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qdev-monitor.c') 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; } -- cgit 1.4.1