aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-10-22 12:52:43 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-10-24 15:27:20 +0200
commit5c936a83c3301f6919d2e0ba9eb977370a8a1ac7 (patch)
tree8cfc39e0a62ebae9e38d74f6d9d0e58c7557fdae /qemu-char.c
parentba60e727b0a824baa1762264be5ef67dc30a6bac (diff)
downloadqemu-5c936a83c3301f6919d2e0ba9eb977370a8a1ac7.zip
qemu-5c936a83c3301f6919d2e0ba9eb977370a8a1ac7.tar.gz
qemu-5c936a83c3301f6919d2e0ba9eb977370a8a1ac7.tar.bz2
ringbuf: fix chr_write return value
It should return the number of written bytes. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022095318.17775-4-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c2
1 files changed, 1 insertions, 1 deletions
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)