mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
virtio-serial: Send out guest data to ports only if port is opened
Data should be written only when ports are open. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
4048c7c321
commit
3ecb45f893
@ -335,6 +335,11 @@ static void handle_output(VirtIODevice *vdev, VirtQueue *vq)
|
||||
goto next_buf;
|
||||
}
|
||||
|
||||
if (!port->host_connected) {
|
||||
ret = 0;
|
||||
goto next_buf;
|
||||
}
|
||||
|
||||
/*
|
||||
* A port may not have any handler registered for consuming the
|
||||
* data that the guest sends or it may not have a chardev associated
|
||||
|
Loading…
Reference in New Issue
Block a user