Received: from eggs.gnu.org ([2001:4830:134:3::10]:46695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byfbj-0004A7-5C for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:48:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byfbi-0006Qd-Fd for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:48:07 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1byfbi-0006Q3-8p for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:48:06 -0400 Received: by mail-wm0-x244.google.com with SMTP id o81so9897401wma.2 for ; Mon, 24 Oct 2016 06:48:06 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 24 Oct 2016 15:47:07 +0200 Message-Id: <1477316855-42218-23-git-send-email-pbonzini@redhat.com> In-Reply-To: <1477316855-42218-1-git-send-email-pbonzini@redhat.com> References: <1477316855-42218-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 22/50] ringbuf: fix chr_write return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-André Lureau 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 --- qemu-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 9165051..650943d 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) -- 1.8.3.1