qemu-e2k/chardev
Peter Maydell 5b18a6bf44 chardev: Allow setting file chardev input file on the command line
Our 'file' chardev backend supports both "output from this chardev
is written to a file" and "input from this chardev should be read
from a file" (except on Windows). However, you can only set up
the input file if you're using the QMP interface -- there is no
command line syntax to do it.

Add command line syntax to allow specifying an input file
as well as an output file, using a new 'input-path' suboption.

The specific use case I have is that I'd like to be able to
feed fuzzer reproducer input into qtest without having to use
'-qtest stdio' and put the input onto stdin. Being able to
use a file chardev like this:
 -chardev file,id=repro,path=/dev/null,input-path=repro.txt -qtest chardev:repro
means that stdio is free for use by gdb.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230413150724.404304-3-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[thuth: Replace "input-file=" typo with "input-path="]
Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-04-20 06:50:11 +02:00
..
baum.c replace TABs with spaces 2023-03-20 12:43:50 +01:00
char-console.c
char-fd.c Refactoring: refactor TFR() macro to RETRY_ON_EINTR() 2023-01-09 13:50:47 +01:00
char-fe.c
char-file.c chardev: Allow setting file chardev input file on the command line 2023-04-20 06:50:11 +02:00
char-hmp-cmds.c char: Move HMP commands from monitor/ to chardev/ 2023-02-04 07:56:54 +01:00
char-io.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
char-mux.c chardev: don't exit() straight away on C-a x 2021-11-04 10:32:01 +00:00
char-null.c
char-parallel.c chardev: clean up chardev-parallel.c 2023-01-11 10:44:33 +01:00
char-pipe.c Refactoring: refactor TFR() macro to RETRY_ON_EINTR() 2023-01-09 13:50:47 +01:00
char-pty.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00
char-ringbuf.c
char-serial.c chardev: replace qemu_set_nonblock() 2022-05-03 15:51:52 +04:00
char-socket.c chardev/char-socket: set s->listener = NULL in char_socket_finalize 2023-03-02 19:13:52 -05:00
char-stdio.c chardev: replace qemu_set_nonblock() 2022-05-03 15:51:52 +04:00
char-udp.c qapi chardev: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
char-win-stdio.c chardev/char-win-stdio: Pass Ctrl+C to guest with a multiplexed monitor 2022-11-21 11:30:11 +04:00
char-win.c
char.c chardev: Allow setting file chardev input file on the command line 2023-04-20 06:50:11 +02:00
chardev-internal.h Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
meson.build char: Move HMP commands from monitor/ to chardev/ 2023-02-04 07:56:54 +01:00
msmouse.c chardev: fix segfault in finalize 2022-09-29 14:38:05 +04:00
spice.c ui/spice: Require spice-server >= 0.14.0 2023-01-19 13:30:01 +01:00
testdev.c
trace-events
trace.h
wctablet.c chardev: fix segfault in finalize 2022-09-29 14:38:05 +04:00