From f9fb0532fb0c7155c0616614dc12ecccf93f8afb Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 5 Apr 2013 11:30:19 +0200 Subject: 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 Acked-by: Amit Shah Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-serial.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw/virtio') 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; /* -- cgit v1.2.3