mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
virtio-serial: Apps should consume all data that guest sends out / Fix virtio api abuse
We cannot indicate to the guest how much data was consumed by an app for out_bufs. So we just have to assume the apps will consume all the data that are handed over to them. Fix the virtio api abuse in control_out() and handle_output(). Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
e85ba9b2dc
commit
1e4476aa03
3 changed files with 8 additions and 11 deletions
|
@ -136,10 +136,10 @@ struct VirtIOSerialPortInfo {
|
|||
|
||||
/*
|
||||
* Guest wrote some data to the port. This data is handed over to
|
||||
* the app via this callback. The app should return the number of
|
||||
* bytes it successfully consumed.
|
||||
* the app via this callback. The app is supposed to consume all
|
||||
* the data that is presented to it.
|
||||
*/
|
||||
size_t (*have_data)(VirtIOSerialPort *port, const uint8_t *buf, size_t len);
|
||||
void (*have_data)(VirtIOSerialPort *port, const uint8_t *buf, size_t len);
|
||||
};
|
||||
|
||||
/* Interface to the virtio-serial bus */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue