mirror of
https://github.com/qemu/qemu.git
synced 2025-08-15 13:47:03 +00:00
chardev: remove qemu_chr_fe_read_all() counter
There is no obvious reason to have a loop counter. This limits from reading several megabytes large buffers in one go, since socket read/write usually have a limit. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
90a6d17bed
commit
43182856c5
@ -56,7 +56,7 @@ int qemu_chr_fe_write_all(CharBackend *be, const uint8_t *buf, int len)
|
|||||||
int qemu_chr_fe_read_all(CharBackend *be, uint8_t *buf, int len)
|
int qemu_chr_fe_read_all(CharBackend *be, uint8_t *buf, int len)
|
||||||
{
|
{
|
||||||
Chardev *s = be->chr;
|
Chardev *s = be->chr;
|
||||||
int offset = 0, counter = 10;
|
int offset = 0;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (!s || !CHARDEV_GET_CLASS(s)->chr_sync_read) {
|
if (!s || !CHARDEV_GET_CLASS(s)->chr_sync_read) {
|
||||||
@ -88,10 +88,6 @@ int qemu_chr_fe_read_all(CharBackend *be, uint8_t *buf, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
offset += res;
|
offset += res;
|
||||||
|
|
||||||
if (!counter--) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemu_chr_replay(s) && replay_mode == REPLAY_MODE_RECORD) {
|
if (qemu_chr_replay(s) && replay_mode == REPLAY_MODE_RECORD) {
|
||||||
|
Loading…
Reference in New Issue
Block a user