From: Marc-André Lureau Date: Sat, 22 Oct 2016 09:52:43 +0000 (+0300) Subject: ringbuf: fix chr_write return value X-Git-Tag: v2.8.0-rc0~68^2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c936a83c3301f6919d2e0ba9eb977370a8a1ac7;p=thirdparty%2Fqemu.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 9165051f2aa..650943d2742 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)