aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-pci.c
diff options
context:
space:
mode:
authorKONRAD Frederic <fred.konrad@greensocs.com>2013-05-15 14:12:50 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-05-15 08:48:25 -0500
commit800ced8cac361c5d492ac82c4aa344ff769ecf2e (patch)
tree8c6f285d9979763493ee52f50bb4ea9f59da302e /hw/virtio/virtio-pci.c
parent8a253ec26ec6eb636c962a47767370f6032b8cf5 (diff)
virtio-net-x: forward the netclient name and type.
This forwards the name and the type of virtio-net-x to fix the bad behaviour of "info network" command. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1368619970-23892-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio/virtio-pci.c')
-rw-r--r--hw/virtio/virtio-pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 113fbd9550..70d2c6b5e3 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1398,10 +1398,13 @@ static Property virtio_net_properties[] = {
static int virtio_net_pci_init(VirtIOPCIProxy *vpci_dev)
{
+ DeviceState *qdev = DEVICE(vpci_dev);
VirtIONetPCI *dev = VIRTIO_NET_PCI(vpci_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
virtio_net_set_config_size(&dev->vdev, vpci_dev->host_features);
+ virtio_net_set_netclient_name(&dev->vdev, qdev->id,
+ object_get_typename(OBJECT(qdev)));
qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
if (qdev_init(vdev) < 0) {
return -1;