diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-04-05 11:30:19 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-04-16 11:52:09 +0200 |
commit | f9fb0532fb0c7155c0616614dc12ecccf93f8afb (patch) | |
tree | 589c51095b3708a09fea349c034c5e5acd84b7d5 /include/hw | |
parent | 8bb9f51ca243551fb838a3a6a2983016ed2bbb73 (diff) | |
download | 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/hw')
-rw-r--r-- | include/hw/virtio/virtio-serial.h | 2 |
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; /* |