Revision 80270a19 hw/virtio/virtio-pci.c
b/hw/virtio/virtio-pci.c | ||
---|---|---|
1297 | 1297 |
{ |
1298 | 1298 |
VirtIOSerialPCI *dev = VIRTIO_SERIAL_PCI(vpci_dev); |
1299 | 1299 |
DeviceState *vdev = DEVICE(&dev->vdev); |
1300 |
DeviceState *proxy = DEVICE(vpci_dev); |
|
1301 |
char *bus_name; |
|
1300 | 1302 |
|
1301 | 1303 |
if (vpci_dev->class_code != PCI_CLASS_COMMUNICATION_OTHER && |
1302 | 1304 |
vpci_dev->class_code != PCI_CLASS_DISPLAY_OTHER && /* qemu 0.10 */ |
... | ... | |
1310 | 1312 |
vpci_dev->nvectors = dev->vdev.serial.max_virtserial_ports + 1; |
1311 | 1313 |
} |
1312 | 1314 |
|
1315 |
/* |
|
1316 |
* For command line compatibility, this sets the virtio-serial-device bus |
|
1317 |
* name as before. |
|
1318 |
*/ |
|
1319 |
if (proxy->id) { |
|
1320 |
bus_name = g_strdup_printf("%s.0", proxy->id); |
|
1321 |
virtio_device_set_child_bus_name(VIRTIO_DEVICE(vdev), bus_name); |
|
1322 |
g_free(bus_name); |
|
1323 |
} |
|
1324 |
|
|
1313 | 1325 |
qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus)); |
1314 | 1326 |
if (qdev_init(vdev) < 0) { |
1315 | 1327 |
return -1; |
Also available in: Unified diff