Skip to content

Commit

Permalink
ringbuf: fix chr_write return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
elmarco authored and bonzini committed Oct 24, 2016
1 parent ba60e72 commit 5c936a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qemu-char.c
Expand Up @@ -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)
Expand Down

0 comments on commit 5c936a8

Please sign in to comment.