From patchwork Thu Aug 4 01:07:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Liu X-Patchwork-Id: 9262505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4B1036048B for ; Thu, 4 Aug 2016 01:12:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32C7427FAB for ; Thu, 4 Aug 2016 01:12:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 258A928068; Thu, 4 Aug 2016 01:12:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E114D27FAB for ; Thu, 4 Aug 2016 01:12:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bV79h-0003p3-UV; Thu, 04 Aug 2016 01:09:01 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bV79g-0003ox-Hf for xen-devel@lists.xensource.com; Thu, 04 Aug 2016 01:09:00 +0000 Received: from [193.109.254.147] by server-2.bemta-14.messagelabs.com id 2E/EE-30017-BA592A75; Thu, 04 Aug 2016 01:08:59 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPLMWRWlGSWpSXmKPExsUyZ7p8oO7qqYv CDf6281rcm/Ke3YHRY3vfLvYAxijWzLyk/IoE1oyZt/wLnrFV7Jr7jL2B8ShrFyMXh5DABCaJ b/27WCCcr4wS055eZoJwNjBK3Ps6hQ3C6WWUuLz4JXsXIwcHm4CSxPz76V2MnBwiAooS61a/A +tmFuhmlHi85j4rSEJYwE+if+EbdhCbRUBVYv3ep8wgvbwCThLLN0iDhCWAerufTWCDsA0lPm 9cyjyBkWcBI8MqRo3i1KKy1CJdQ0O9pKLM9IyS3MTMHCDPRC83tbg4MT01JzGpWC85P3cTI9D zDECwg/HMCudDjJIcTEqivDmpi8KF+JLyUyozEosz4otKc1KLDzHKcHAoSfCungKUEyxKTU+t SMvMAYYgTFqCg0dJhHcTSJq3uCAxtzgzHSJ1ilGXY8GP22uZhFjy8vNSpcR5TUCKBECKMkrz4 EbA4uESo6yUMC8j0FFCPAWpRbmZJajyrxjFORiVhHlrQabwZOaVwG16BXQEE9ARJwwWgBxRko iQkmpgbGtauJI3SSHvHmN8St7qgsLoxAMJX9aI11q4Wge0Gvly3A+NO67RLGyfvWp+8Ma7zEW SxRsKp05Z3MS13XbvoWsPuDjCk5qZlp9t2qGarHTgnJiWdmGUV9rxA/MO+exr3js//E7n2gvs CTNVLT7McXmZbyfDeOGp7Zy3bDtZjnpxPXv0LERKiaU4I9FQi7moOBEAgJKNU4ICAAA= X-Env-Sender: bob.liu@oracle.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1470272937!57649811!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21712 invoked from network); 4 Aug 2016 01:08:58 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-9.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 4 Aug 2016 01:08:58 -0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u7418si3015548 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Aug 2016 01:08:54 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u7418rLx007072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Aug 2016 01:08:53 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u7418qTR004723; Thu, 4 Aug 2016 01:08:52 GMT Received: from boliuliu.jp.oracle.com (/10.191.4.175) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 03 Aug 2016 18:08:51 -0700 From: Bob Liu To: xen-devel@lists.xensource.com Date: Thu, 4 Aug 2016 09:07:56 +0800 Message-Id: <1470272876-29435-1-git-send-email-bob.liu@oracle.com> X-Mailer: git-send-email 1.7.10.4 X-Source-IP: userv0022.oracle.com [156.151.31.74] Cc: ian.jackson@eu.citrix.com, joao.m.martins@oracle.com, wei.liu2@citrix.com, Bob Liu Subject: [Xen-devel] [PATCH v2] libxl: return any serial tty path in libxl_console_get_tty X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP When specifying a serial list in domain config, users of libxl_console_get_tty cannot get the tty path of a second specified pty serial, since right now it always returns the tty path of serial 0. Signed-off-by: Bob Liu Acked-by: Wei Liu --- v2: Rename the patch title. --- tools/libxl/libxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 2cf7451..00af286 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1795,7 +1795,7 @@ int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num, switch (type) { case LIBXL_CONSOLE_TYPE_SERIAL: - tty_path = GCSPRINTF("%s/serial/0/tty", dom_path); + tty_path = GCSPRINTF("%s/serial/%d/tty", dom_path, cons_num); break; case LIBXL_CONSOLE_TYPE_PV: if (cons_num == 0)