From patchwork Thu Jan 3 13:23:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 209251 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F1D2E2C0080 for ; Fri, 4 Jan 2013 00:31:00 +1100 (EST) Received: from localhost ([::1]:56467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqkss-00088L-K9 for incoming@patchwork.ozlabs.org; Thu, 03 Jan 2013 08:30:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqksm-00088D-Dm for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:30:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tqksj-00004y-SN for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:30:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqksj-0008WV-KR for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:30:49 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r03DUg0Q008004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 3 Jan 2013 08:30:49 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r03DUMPO029657; Thu, 3 Jan 2013 08:30:33 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id C9A68411FA; Thu, 3 Jan 2013 14:23:03 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 3 Jan 2013 14:23:03 +0100 Message-Id: <1357219383-30748-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH] pty: unbreak libvirt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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}". 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;