From 1034e9cf4d0740c4c845d79998ac53a5b23e534d Mon Sep 17 00:00:00 2001 From: KONRAD Frederic Date: Tue, 30 Apr 2013 16:08:48 +0200 Subject: virtio: add virtio_device_set_child_bus_name. Add virtio_device_set_child_bus_name function. It will be used with virtio-serial-x and virtio-scsi-x to set the child bus name before calling virtio-x-device's init. Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Message-id: 1367330931-12994-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori --- include/hw/virtio/virtio.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/virtio') diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index ae7a4c43d3..a6c5c5380c 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -118,6 +118,7 @@ struct VirtIODevice uint16_t device_id; bool vm_running; VMChangeStateEntry *vmstate; + char *bus_name; }; typedef struct VirtioDeviceClass { @@ -149,6 +150,9 @@ void virtio_init(VirtIODevice *vdev, const char *name, uint16_t device_id, size_t config_size); void virtio_cleanup(VirtIODevice *vdev); +/* Set the child bus name. */ +void virtio_device_set_child_bus_name(VirtIODevice *vdev, char *bus_name); + VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size, void (*handle_output)(VirtIODevice *, VirtQueue *)); -- cgit v1.2.3