aboutsummaryrefslogtreecommitdiff
path: root/include/hw/qdev-core.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2020-11-18 09:37:36 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-12-08 13:48:57 -0500
commit89631fed27bd76b0292d8b2a78291ea96185c87d (patch)
tree9b45a28421b9b05feb26482f5e7796bd892011e5 /include/hw/qdev-core.h
parent7cf05b7ed8e84e89b873701e3dfcd56aa81b2d13 (diff)
failover: should_be_hidden() should take a bool
We didn't use at all the -1 value, and we don't really care. It was only used for the cases when this is not the device that we are searching for. And in that case we should not hide the device. Once there, simplify virtio-Snet_primary_should_be_hidden. Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <20201118083748.1328-16-quintela@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/qdev-core.h')
-rw-r--r--include/hw/qdev-core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 5e737195b5..250f4edef6 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -200,7 +200,7 @@ struct DeviceListener {
* inform qdev that a device should be hidden, depending on the device
* opts, for example, to hide a standby device.
*/
- int (*should_be_hidden)(DeviceListener *listener, QemuOpts *device_opts);
+ bool (*should_be_hidden)(DeviceListener *listener, QemuOpts *device_opts);
QTAILQ_ENTRY(DeviceListener) link;
};