mirror of https://gitee.com/openkylin/qemu.git
net/virtio: return early when failover primary alread added
Bail out when primary device was already added before.
This avoids printing a wrong warning message during reboot.
Fixes: 9711cd0dfc
("net/virtio: add failover support")
Signed-off-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
284f42a520
commit
117378bf03
|
@ -759,6 +759,10 @@ static void failover_add_primary(VirtIONet *n, Error **errp)
|
||||||
{
|
{
|
||||||
Error *err = NULL;
|
Error *err = NULL;
|
||||||
|
|
||||||
|
if (n->primary_dev) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
n->primary_device_opts = qemu_opts_find(qemu_find_opts("device"),
|
n->primary_device_opts = qemu_opts_find(qemu_find_opts("device"),
|
||||||
n->primary_device_id);
|
n->primary_device_id);
|
||||||
if (n->primary_device_opts) {
|
if (n->primary_device_opts) {
|
||||||
|
|
Loading…
Reference in New Issue