Commit 25bbf61e authored by Gerd Hoffmann's avatar Gerd Hoffmann Committed by Anthony Liguori
Browse files

pty: unbreak libvirt



Commit 58650218 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: default avatarGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent ef4929fb
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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;