failover: should_be_hidden() should take a bool
commit89631fed27bd76b0292d8b2a78291ea96185c87d
authorJuan Quintela <quintela@redhat.com>
Wed, 18 Nov 2020 08:37:36 +0000 (18 09:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 8 Dec 2020 18:48:57 +0000 (8 13:48 -0500)
tree9b45a28421b9b05feb26482f5e7796bd892011e5
parent7cf05b7ed8e84e89b873701e3dfcd56aa81b2d13
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>
hw/core/qdev.c
hw/net/virtio-net.c
include/hw/qdev-core.h