[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-xen master] hw/char/spapr_vty: Return amount of free buffer entries in vty_can_receive()
commit 8a273cbe53221d28abfc98f33a0d057b26e53d6a Author: Thomas Huth <thuth@xxxxxxxxxx> AuthorDate: Fri Nov 18 10:09:37 2016 +0100 Commit: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> CommitDate: Wed Nov 23 12:00:48 2016 +1100 hw/char/spapr_vty: Return amount of free buffer entries in vty_can_receive() The can_receive() callbacks of the character devices should return the amount of characters that can be accepted at once, not just a boolean value (which rather means only one character at a time). Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx> Signed-off-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> --- hw/char/spapr_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c index 06b9b39..7c22b8b 100644 --- a/hw/char/spapr_vty.c +++ b/hw/char/spapr_vty.c @@ -25,7 +25,7 @@ static int vty_can_receive(void *opaque) { VIOsPAPRVTYDevice *dev = VIO_SPAPR_VTY_DEVICE(opaque); - return (dev->in - dev->out) < VTERM_BUFSIZE; + return VTERM_BUFSIZE - (dev->in - dev->out); } static void vty_receive(void *opaque, const uint8_t *buf, int size) -- generated by git-patchbot for /home/xen/git/qemu-xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |