diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-04-17 21:06:41 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-04-18 22:18:59 +0200 |
commit | 8acb2a758bdeb15027ae3150fc0f4e14f6078006 (patch) | |
tree | 578d7fcf17e21d159e7a909eaa925a338b7069e5 /monitor.c | |
parent | 6ade45f2ac936114d82a18ed10df1fb717f4a584 (diff) | |
download | qemu-8acb2a758bdeb15027ae3150fc0f4e14f6078006.zip qemu-8acb2a758bdeb15027ae3150fc0f4e14f6078006.tar.gz qemu-8acb2a758bdeb15027ae3150fc0f4e14f6078006.tar.bz2 |
monitor: Simplify how -device/device_add print help
Commit a95db58f210 added monitor_vfprintf() as an error_printf()
generalized from stderr to arbitrary streams, then used it wrapped in
helper out_printf() to print -device/device_add help to stdout. Use
qemu_printf() instead, and delete monitor_vfprintf() and out_printf().
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20190417190641.26814-16-armbru@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -4542,22 +4542,14 @@ static void monitor_readline_flush(void *opaque) } /* - * Print to current monitor if we have one, else to stream. + * Print to current monitor if we have one, else to stderr. */ -int monitor_vfprintf(FILE *stream, const char *fmt, va_list ap) +int error_vprintf(const char *fmt, va_list ap) { if (cur_mon && !monitor_cur_is_qmp()) { return monitor_vprintf(cur_mon, fmt, ap); } - return vfprintf(stream, fmt, ap); -} - -/* - * Print to current monitor if we have one, else to stderr. - */ -int error_vprintf(const char *fmt, va_list ap) -{ - return monitor_vfprintf(stderr, fmt, ap); + return vfprintf(stderr, fmt, ap); } int error_vprintf_unless_qmp(const char *fmt, va_list ap) |