pty: unbreak libvirt

Commit 586502189e 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>
This commit is contained in:
Gerd Hoffmann 2013-01-03 14:23:03 +01:00 committed by Anthony Liguori
parent ef4929fb3c
commit 25bbf61e4b
1 changed files with 5 additions and 4 deletions

View File

@ -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;