From: Marc-André Lureau Date: Sat, 22 Oct 2016 09:52:43 +0000 (+0300) Subject: ringbuf: fix chr_write return value X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5c936a83c3301f6919d2e0ba9eb977370a8a1ac7;p=qemu.git ringbuf: fix chr_write return value It should return the number of written bytes. Signed-off-by: Marc-André Lureau Message-Id: <20161022095318.17775-4-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- diff --git a/qemu-char.c b/qemu-char.c index 9165051f2a..650943d274 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3328,7 +3328,7 @@ static int ringbuf_chr_write(CharDriverState *chr, const uint8_t *buf, int len) } } - return 0; + return len; } static int ringbuf_chr_read(CharDriverState *chr, uint8_t *buf, int len)