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>
This commit is contained in:
Marc-André Lureau 2016-10-22 12:52:43 +03:00 committed by Paolo Bonzini
parent ba60e727b0
commit 5c936a83c3

View File

@ -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)