Commit 0cf63c3e authored by Gonglei's avatar Gonglei Committed by Gerd Hoffmann
Browse files

virtio-net: alias bootindex property explicitly for virt-net-pci/ccw/s390



Since the "bootindex" property is a QOM property and not a qdev property
now, we must alias it explicitly for virtio-net-pci, as well as CCW and
s390-virtio.

Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 45e8a9e1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -162,6 +162,8 @@ static void s390_virtio_net_instance_init(Object *obj)

    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
                                TYPE_VIRTIO_NET);
    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
                              "bootindex", &error_abort);
}

static int s390_virtio_blk_init(VirtIOS390Device *s390_dev)
+2 −0
Original line number Diff line number Diff line
@@ -795,6 +795,8 @@ static void virtio_ccw_net_instance_init(Object *obj)

    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
                                TYPE_VIRTIO_NET);
    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
                              "bootindex", &error_abort);
}

static int virtio_ccw_blk_init(VirtioCcwDevice *ccw_dev)
+2 −0
Original line number Diff line number Diff line
@@ -1466,6 +1466,8 @@ static void virtio_net_pci_instance_init(Object *obj)

    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
                                TYPE_VIRTIO_NET);
    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
                              "bootindex", &error_abort);
}

static const TypeInfo virtio_net_pci_info = {