From patchwork Mon Jul 17 09:49:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Schmoll X-Patchwork-Id: 9844695 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 437176037F for ; Mon, 17 Jul 2017 10:58:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 362FA27E63 for ; Mon, 17 Jul 2017 10:58:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B02F2842A; Mon, 17 Jul 2017 10:58:43 +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=-3.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 228B827E63 for ; Mon, 17 Jul 2017 10:58:41 +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 1dX3hi-0003Ii-Pi; Mon, 17 Jul 2017 10:56:42 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dX3hi-0003IW-0h for xen-devel@lists.xenproject.org; Mon, 17 Jul 2017 10:56:42 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id 65/AE-09901-9E79C695; Mon, 17 Jul 2017 10:56:41 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeJIrShJLcpLzFFi42Lxqg1y1H0xPSf S4HyvmcX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmrFm3knmgp9cFSt+L2VqYLzM0cXIxSEkMJ1R 4tjZXYwgDovAJRaJC8dusIM4EgLvWCTurznM1MXICeSkSdz7vwjKrpLoPjMFzBYS0JT40t3FC DFqAZNES9trVpAEm4CBxOyVF5lBbBEBJYl7qyaDNTALJEjseXqbBcQWFtCXePf2HFg9i4CqxO RpD8HivAJ2Emu7p7JALJOX2NV2kXUCI98CRoZVjBrFqUVlqUW6hpZ6SUWZ6RkluYmZObqGBmZ 6uanFxYnpqTmJScV6yfm5mxiBwcIABDsYfywLOMQoycGkJMp7kS07UogvKT+lMiOxOCO+qDQn tfgQowwHh5IEb+W0nEghwaLU9NSKtMwcYNjCpCU4eJREeBtA0rzFBYm5xZnpEKlTjMYckw5s/ 8LE8WrC/29MQix5+XmpUuK8y0FKBUBKM0rz4AbB4ukSo6yUMC8j0GlCPAWpRbmZJajyrxjFOR iVhHljQabwZOaVwO17BXQKE9Apwr5gp5QkIqSkGhhn9qp8uX3F+F6KsJHTC9dPXn9eVU677fV 3veqBgCQPh0QxrqRlUotkUyM9L5nGP2fgYDya/6WYt/TBuUTPrfw+r1s6dxxOk89qaJTmTUtP m2r1IezAl9buZReFTyVGtrz3mvHjRJGiCc95r44zy72mRCsfWBD25YqWyNOnAs9cz/0S97PyL lViKc5INNRiLipOBAAIGueoogIAAA== X-Env-Sender: eggi.innovations@gmail.com X-Msg-Ref: server-7.tower-27.messagelabs.com!1500289000!102894271!1 X-Originating-IP: [74.125.82.65] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 56648 invoked from network); 17 Jul 2017 10:56:40 -0000 Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by server-7.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Jul 2017 10:56:40 -0000 Received: by mail-wm0-f65.google.com with SMTP id 15so10495626wmm.3 for ; Mon, 17 Jul 2017 03:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=B5P6dzJ9MfWCCZ5NpW8cTYccMOunmUoxNP9b6I607dI=; b=MjRPYLOjKhEtHIwGm3i+mj4UQDU8n65qsgrjLgSxylqFW1MHgH4WfsREP4RaOP4mYO waN4BmlcEj1ldo+BlcFt7ItBxXoMjtC1pDRMpQqu2mMAHg7cJdiDhli66h8YTGeDFAe7 RGTOniPwMfePGML23z33qzqcNra4mdAX1b65mWCuqXDZaHdWSQVopHUKHMoqtR+EPJh7 R5z+5yoMS71fIRiJ+IA7ga///9QFJVVwq10WIVWB5SUtrLpA95xmGIGq9oRkRkJ3PO7K bfn2NMop1rYxht75m1JTDYf/ArUO9vqazVQcssN7yt9ZMYEHJ6qPaxvAjFTpEbVSyxvF wTZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=B5P6dzJ9MfWCCZ5NpW8cTYccMOunmUoxNP9b6I607dI=; b=UXBefrWCWY7Tk/DGtYzn8j64y+9macDZY3CmBQD+4RJjVWavCASrBSLf4LzJJTvbny q4k3nB0YiZ9Ae5J094fJKYPYFTYq8KijB3iRyCqACoMR6KEnDM4PyXTnMc52p6Iig/nP EXA9O2yiOuXDGl7bs8960QM+AstnUFnjBoXNsHIydtPPGKxPrz2XcAfU2yb0ek2hkgK2 CW4FWn3ytTewHOHw1yIzi54RbD03aRFIp1O5uvUTrOZywPVxJxe15TXW26swv0QFqbde ltRo9sAz8rXsRn33LYk2RM0yTfh08HcR4XQm8XRldQPwqRTkP91nyQK0y6Y+tzsq/UTz cAuQ== X-Gm-Message-State: AIVw113HG9SokRUT7WQajDuWDcM5wB6HBtBSzUpLix4wGhXuCWRcVaEu q4rX91f7sIm4NCzX9vxVXQ== X-Received: by 10.28.150.139 with SMTP id y133mr3658797wmd.61.1500289000257; Mon, 17 Jul 2017 03:56:40 -0700 (PDT) Received: from localhost.localdomain (ip-109-47-1-181.web.vodafone.de. [109.47.1.181]) by smtp.gmail.com with ESMTPSA id r70sm13085247wmb.16.2017.07.17.03.56.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 03:56:39 -0700 (PDT) From: Felix Schmoll To: xen-devel@lists.xenproject.org Date: Mon, 17 Jul 2017 11:49:11 +0200 Message-Id: <20170717094911.3966-1-eggi.innovations@gmail.com> X-Mailer: git-send-email 2.11.0 Cc: ian.jackson@eu.citrix.com, wei.liu2@citrix.com, Felix Schmoll Subject: [Xen-devel] [PATCH v2] xenconsole: Add pipe option 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 Add pipe option to xenconsole that forwards console input. Signed-off-by: Felix Schmoll --- Changed since v1: * introduce separate pipe flag * remove changes to libxl --- tools/console/client/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/console/client/main.c b/tools/console/client/main.c index 977779f034..84a466c32f 100644 --- a/tools/console/client/main.c +++ b/tools/console/client/main.c @@ -334,6 +334,7 @@ int main(int argc, char **argv) { "num", 1, 0, 'n' }, { "help", 0, 0, 'h' }, { "start-notify-fd", 1, 0, 's' }, + { "pipe", 0, 0, 'p' }, { 0 }, }; @@ -343,6 +344,7 @@ int main(int argc, char **argv) char *end; console_type type = CONSOLE_INVAL; bool interactive = 0; + bool pipe = 0; if (isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)) interactive = 1; @@ -370,6 +372,9 @@ int main(int argc, char **argv) case 's': start_notify_fd = atoi(optarg); break; + case 'p': + pipe = 1; + break; default: fprintf(stderr, "Invalid argument\n"); fprintf(stderr, "Try `%s --help' for more information.\n", @@ -484,7 +489,7 @@ int main(int argc, char **argv) close(start_notify_fd); } - console_loop(spty, xs, path, interactive); + console_loop(spty, xs, path, interactive || pipe); free(path); free(dom_path);