aboutsummaryrefslogtreecommitdiff
path: root/chardev/char.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-17 21:06:39 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-04-18 22:18:59 +0200
commitef2fd6f1d1e5333eacaebc8466ed5dbed0d55b8b (patch)
tree1b660e1723faf8a5e246257f31e1efc3b10f0c2b /chardev/char.c
parentcdcd43612032aa91aaa747aacc129a5c781ba447 (diff)
char: Make -chardev help print to stdout
Command line help explicitly requested by the user should be printed to stdout, not stderr. We do elsewhere. Adjust -chardev to match: use qemu_printf() instead of error_printf(). Plain printf() would be wrong because we need to print to the current monitor for "chardev-add help". Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190417190641.26814-14-armbru@redhat.com>
Diffstat (limited to 'chardev/char.c')
-rw-r--r--chardev/char.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/chardev/char.c b/chardev/char.c
index 514cd6b0c3..54724a56b1 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -28,6 +28,7 @@
#include "sysemu/sysemu.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
+#include "qemu/qemu-print.h"
#include "chardev/char.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-char.h"
@@ -651,7 +652,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
chardev_name_foreach(help_string_append, str);
- error_printf("Available chardev backend types: %s\n", str->str);
+ qemu_printf("Available chardev backend types: %s\n", str->str);
g_string_free(str, true);
return NULL;
}