mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
89631fed27
commit
b91ad981b8
3 changed files with 20 additions and 19 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue