virtio-console: Also throttle when less was written then requested
commitf9fb0532fb0c7155c0616614dc12ecccf93f8afb
authorHans de Goede <hdegoede@redhat.com>
Fri, 5 Apr 2013 09:30:19 +0000 (5 11:30 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 16 Apr 2013 09:52:09 +0000 (16 11:52 +0200)
tree589c51095b3708a09fea349c034c5e5acd84b7d5
parent8bb9f51ca243551fb838a3a6a2983016ed2bbb73
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>
hw/char/virtio-console.c
include/hw/virtio/virtio-serial.h