mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
08ab59770d
commit
a1857ad1ac
2 changed files with 12 additions and 0 deletions
|
@ -202,6 +202,8 @@ struct VirtIOSerial {
|
|||
|
||||
QTAILQ_HEAD(, VirtIOSerialPort) ports;
|
||||
|
||||
QLIST_ENTRY(VirtIOSerial) next;
|
||||
|
||||
/* bitmap for identifying active ports */
|
||||
uint32_t *ports_map;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue