diff options
author | Juan Quintela | 2020-11-18 09:37:37 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2020-12-08 19:48:57 +0100 |
commit | b91ad981b867e15171234efc3f2ab4074d377cef (patch) | |
tree | 098098d58c1247257826f350d830f20f860b097f /hw/net | |
parent | failover: should_be_hidden() should take a bool (diff) | |
download | qemu-b91ad981b867e15171234efc3f2ab4074d377cef.tar.gz qemu-b91ad981b867e15171234efc3f2ab4074d377cef.tar.xz qemu-b91ad981b867e15171234efc3f2ab4074d377cef.zip |
failover: Rename function to hide_device()
You should not use pasive.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20201118083748.1328-17-quintela@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/virtio-net.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 9f12d33da0..747614ff2a 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3161,8 +3161,8 @@ static void virtio_net_migration_state_notifier(Notifier *notifier, void *data) virtio_net_handle_migration_primary(n, s); } -static bool virtio_net_primary_should_be_hidden(DeviceListener *listener, - QemuOpts *device_opts) +static bool failover_hide_primary_device(DeviceListener *listener, + QemuOpts *device_opts) { VirtIONet *n = container_of(listener, VirtIONet, primary_listener); bool hide; @@ -3220,8 +3220,7 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp) } if (n->failover) { - n->primary_listener.should_be_hidden = - virtio_net_primary_should_be_hidden; + n->primary_listener.hide_device = failover_hide_primary_device; qatomic_set(&n->failover_primary_hidden, true); device_listener_register(&n->primary_listener); n->migration_state.notify = virtio_net_migration_state_notifier; |