aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-01-03 14:23:03 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-03 12:53:41 -0600
commit25bbf61e4bacd1e4fa4115ffcf151051b9d6608e (patch)
treefffbe222fd1442dea3094270c67779209782d3a6
parentef4929fb3c25e03deca76c7f5d22fba08edf864f (diff)
downloadqemu-25bbf61e4bacd1e4fa4115ffcf151051b9d6608e.zip
qemu-25bbf61e4bacd1e4fa4115ffcf151051b9d6608e.tar.gz
qemu-25bbf61e4bacd1e4fa4115ffcf151051b9d6608e.tar.bz2
pty: unbreak libvirt
Commit 586502189edf9fd0f89a83de96717a2ea826fdb0 breaks libvirt pty support because it tried to figure the pts name from stderr output. Fix this by moving the label to the end of the line, this way the libvirt parser does still recognise the message. libvirt looks for "char device redirected to ${ptsname}<whitespace>". Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--qemu-char.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 331ad5c..f41788c 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1012,10 +1012,11 @@ static CharDriverState *qemu_chr_open_pty(QemuOpts *opts)
qemu_opt_set(opts, "path", q_ptsname(master_fd));
label = qemu_opts_id(opts);
- fprintf(stderr, "char device%s%s redirected to %s\n",
- label ? " " : "",
- label ?: "",
- q_ptsname(master_fd));
+ fprintf(stderr, "char device redirected to %s%s%s%s\n",
+ q_ptsname(master_fd),
+ label ? " (label " : "",
+ label ? label : "",
+ label ? ")" : "");
s = g_malloc0(sizeof(PtyCharDriver));
chr->opaque = s;