From: "Daniel P. Berrange" <berrange@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pty: unbreak libvirt
Date: Thu, 3 Jan 2013 13:33:18 +0000 [thread overview]
Message-ID: <20130103133318.GA8926@redhat.com> (raw)
In-Reply-To: <1357219383-30748-1-git-send-email-kraxel@redhat.com>
On Thu, Jan 03, 2013 at 02:23:03PM +0100, Gerd Hoffmann wrote:
> 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>".
FWIW, libvirt was not supposed to be parsing this data still.
We rely on query-chardev to get the PTYs, but we were accidentally
still invoking the stdio parsing code even though we didn't use
the result :-(
This flaw is fixed in latest libvirt GIT.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> qemu-char.c | 9 +++++----
> 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;
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
next prev parent reply other threads:[~2013-01-03 13:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 13:23 [Qemu-devel] [PATCH] pty: unbreak libvirt Gerd Hoffmann
2013-01-03 13:33 ` Daniel P. Berrange [this message]
2013-01-03 18:55 ` Anthony Liguori
2013-01-03 19:00 ` Anthony Liguori
2013-01-03 19:10 ` Peter Maydell
2013-01-03 19:44 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130103133318.GA8926@redhat.com \
--to=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).