mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
d96aa5db4f
The qemu_chr_write_buffer() method sends data to the chardev backend for
writing, and then also writes to the log file. In case the chardev
backend only writes part of the data buffer, we need to make sure we
only log the same subset. qemu_chr_write_buffer() will be invoked again
later to write the rest of the buffer.
In the case the chardev backend returns an error though, no further
attempts to likely to be made to write the data. We must therefore write
the entire buffer to the log immediately.
An example where this is important is with the socket backend. This will
return -1 for all writes if no client is currently connected. We still
wish to write data to the log file when no client is present though.
This used to work because the chardev would return "len" to pretend it
had written all data when no client is connected, but this changed to
return an error in
commit
|
||
---|---|---|
.. | ||
baum.c | ||
char-console.c | ||
char-fd.c | ||
char-fe.c | ||
char-file.c | ||
char-io.c | ||
char-mux.c | ||
char-null.c | ||
char-parallel.c | ||
char-pipe.c | ||
char-pty.c | ||
char-ringbuf.c | ||
char-serial.c | ||
char-socket.c | ||
char-stdio.c | ||
char-udp.c | ||
char-win-stdio.c | ||
char-win.c | ||
char.c | ||
chardev-internal.h | ||
chardev-sysemu.c | ||
meson.build | ||
msmouse.c | ||
spice.c | ||
testdev.c | ||
trace-events | ||
trace.h | ||
wctablet.c |