Revision 80270a19 hw/s390x/s390-virtio-bus.c
b/hw/s390x/s390-virtio-bus.c | ||
---|---|---|
197 | 197 |
DeviceState *qdev = DEVICE(s390_dev); |
198 | 198 |
VirtIOS390Bus *bus; |
199 | 199 |
int r; |
200 |
char *bus_name; |
|
200 | 201 |
|
201 | 202 |
bus = DO_UPCAST(VirtIOS390Bus, bus, qdev->parent_bus); |
202 | 203 |
|
204 |
/* |
|
205 |
* For command line compatibility, this sets the virtio-serial-device bus |
|
206 |
* name as before. |
|
207 |
*/ |
|
208 |
if (qdev->id) { |
|
209 |
bus_name = g_strdup_printf("%s.0", qdev->id); |
|
210 |
virtio_device_set_child_bus_name(VIRTIO_DEVICE(vdev), bus_name); |
|
211 |
g_free(bus_name); |
|
212 |
} |
|
213 |
|
|
203 | 214 |
qdev_set_parent_bus(vdev, BUS(&s390_dev->bus)); |
204 | 215 |
if (qdev_init(vdev) < 0) { |
205 | 216 |
return -1; |
Also available in: Unified diff