From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqkvE-0000sK-QR for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:33:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqkvD-0000ZR-Ic for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:33:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqkvD-0000ZN-BX for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:33:23 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r03DXM5o013665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 3 Jan 2013 08:33:22 -0500 Date: Thu, 3 Jan 2013 13:33:18 +0000 From: "Daniel P. Berrange" Message-ID: <20130103133318.GA8926@redhat.com> References: <1357219383-30748-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1357219383-30748-1-git-send-email-kraxel@redhat.com> Subject: Re: [Qemu-devel] [PATCH] pty: unbreak libvirt Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org 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}". 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 > --- > 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 :|