summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHans de Goede2013-04-05 11:30:19 +0200
committerGerd Hoffmann2013-04-16 11:52:09 +0200
commitf9fb0532fb0c7155c0616614dc12ecccf93f8afb (patch)
tree589c51095b3708a09fea349c034c5e5acd84b7d5 /include
parentspice: (32 bit only) fix surface cmd tracking destruction (diff)
downloadqemu-f9fb0532fb0c7155c0616614dc12ecccf93f8afb.tar.gz
qemu-f9fb0532fb0c7155c0616614dc12ecccf93f8afb.tar.xz
qemu-f9fb0532fb0c7155c0616614dc12ecccf93f8afb.zip
virtio-console: Also throttle when less was written then requested
This is necessary so that we get properly woken up to write the rest. This patch also changes the len argument to the have_data callback, to avoid doing an unsigned signed comparison. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-serial.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h
index 7c71304d10..1d2040b245 100644
--- a/include/hw/virtio/virtio-serial.h
+++ b/include/hw/virtio/virtio-serial.h
@@ -104,7 +104,7 @@ typedef struct VirtIOSerialPortClass {
* 'len'. In this case, throttling will be enabled for this port.
*/
ssize_t (*have_data)(VirtIOSerialPort *port, const uint8_t *buf,
- size_t len);
+ ssize_t len);
} VirtIOSerialPortClass;
/*