From 89631fed27bd76b0292d8b2a78291ea96185c87d Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 18 Nov 2020 09:37:36 +0100 Subject: 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 Message-Id: <20201118083748.1328-16-quintela@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/qdev-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw/qdev-core.h') 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; }; -- cgit 1.4.1