From: Juan Quintela Date: Tue, 28 Mar 2017 09:08:52 +0000 (+0200) Subject: qdev: qdev_hotplug is really a bool X-Git-Tag: v2.10.0-rc0~251^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bed84c19138bd161e9a6157a93ae0b25b5f7a71;p=thirdparty%2Fqemu.git qdev: qdev_hotplug is really a bool Signed-off-by: Juan Quintela Reviewed-by: zhanghailiang Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 1e7fb332461..6fa46b5245d 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -39,7 +39,7 @@ #include "qapi-event.h" #include "migration/migration.h" -int qdev_hotplug = 0; +bool qdev_hotplug = false; static bool qdev_hot_added = false; static bool qdev_hot_removed = false; @@ -385,7 +385,7 @@ void qdev_machine_creation_done(void) * ok, initial machine setup is done, starting from now we can * only create hotpluggable devices */ - qdev_hotplug = 1; + qdev_hotplug = true; } bool qdev_machine_modified(void) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index b44b4767657..a96a91379fd 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -386,7 +386,7 @@ Object *qdev_get_machine(void); /* FIXME: make this a link<> */ void qdev_set_parent_bus(DeviceState *dev, BusState *bus); -extern int qdev_hotplug; +extern bool qdev_hotplug; char *qdev_get_dev_path(DeviceState *dev);