summaryrefslogtreecommitdiff
path: root/include/hw/virtio/virtio-serial.h
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2014-07-16 16:38:50 +0530
committerAmit Shah <amit.shah@redhat.com>2014-08-18 22:42:37 +0530
commita1857ad1acbddbefe7ce8adb24b0e40991c5c38f (patch)
tree8a9949bd2e3c2d8360adba1cc63e451fbbbdab47 /include/hw/virtio/virtio-serial.h
parent08ab59770da57648bfb8fc9be37f0ef7fb50b0f9 (diff)
downloadqemu-a1857ad1acbddbefe7ce8adb24b0e40991c5c38f.zip
virtio-serial: create a linked list of all active devices
To ensure two virtserialports don't get added to the system with the same 'name' parameter, we need to access all the ports on all the devices added, and compare the names. We currently don't have a list of all VirtIOSerial devices added to the system. This commit adds a simple linked list in which devices are put when they're initialized, and removed when they go away. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio-serial.h')
-rw-r--r--include/hw/virtio/virtio-serial.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h
index 4746312a83..a679e54aab 100644
--- a/include/hw/virtio/virtio-serial.h
+++ b/include/hw/virtio/virtio-serial.h
@@ -202,6 +202,8 @@ struct VirtIOSerial {
QTAILQ_HEAD(, VirtIOSerialPort) ports;
+ QLIST_ENTRY(VirtIOSerial) next;
+
/* bitmap for identifying active ports */
uint32_t *ports_map;