[Qemu-devel] [PATCH 1/5] qdev: qdev_hotplug is really a bool

Juan Quintela posted 5 patches 8 years, 10 months ago
Only 4 patches received!
[Qemu-devel] [PATCH 1/5] qdev: qdev_hotplug is really a bool
Posted by Juan Quintela 8 years, 10 months ago
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/core/qdev.c         | 4 ++--
 include/hw/qdev-core.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 1e7fb33..6fa46b5 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 b44b476..a96a913 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);
 
-- 
2.9.3


Re: [Qemu-devel] [PATCH 1/5] qdev: qdev_hotplug is really a bool
Posted by Eric Blake 8 years, 10 months ago
On 04/06/2017 08:13 AM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/core/qdev.c         | 4 ++--
>  include/hw/qdev-core.h | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Re: [Qemu-devel] [PATCH 1/5] qdev: qdev_hotplug is really a bool
Posted by Philippe Mathieu-Daudé 8 years, 10 months ago
On 04/06/2017 10:13 AM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/core/qdev.c         | 4 ++--
>  include/hw/qdev-core.h | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 1e7fb33..6fa46b5 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 b44b476..a96a913 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);
>
>