From patchwork Mon Apr 3 09:44:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 96598 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp18516qgd; Mon, 3 Apr 2017 02:47:06 -0700 (PDT) X-Received: by 10.107.144.197 with SMTP id s188mr14664225iod.146.1491212826032; Mon, 03 Apr 2017 02:47:06 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id b41si14294218ioj.178.2017.04.03.02.47.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 02:47:06 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuyY7-0001fR-NP; Mon, 03 Apr 2017 09:45:23 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuyY6-0001eL-JZ for xen-devel@lists.xenproject.org; Mon, 03 Apr 2017 09:45:22 +0000 Received: from [193.109.254.147] by server-2.bemta-6.messagelabs.com id AC/7B-19731-2B912E85; Mon, 03 Apr 2017 09:45:22 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHIsWRWlGSWpSXmKPExsXiVRusr7tR8lG Ewc8Fchbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8ajvduZCo5yVcyb+5exgfEURxcjJ4eQwAxG ia378roYuThYBOYxS/zeeYQJxJEQ6GeVuDT/CSNIlYRAjMSlGadZIewyiUl/HjNBdGtJHD01m xWkQUiglUmic9Fi5i5GDg42AROJWR0SIDUiAkoS91ZNBhvKLDCfUWJvz1mwQcICIRJX7z5jBa lnEVCVOPm8FiTMK+AjcfvZHzaIXXISN891go3kBIrfepUAsdZb4tX9aWwTGAUWMDKsYtQoTi0 qSy3SNTbWSyrKTM8oyU3MzNE1NDDTy00tLk5MT81JTCrWS87P3cQIDCsGINjBuHN94CFGSQ4m JVHeN3ceRgjxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4M2VeBQhJFiUmp5akZaZAwxwmLQEB4+SC O8kkDRvcUFibnFmOkTqFKMux4f+w2+YhFjy8vNSpcR5I0GKBECKMkrz4EbAou0So6yUMC8j0F FCPAWpRbmZJajyrxjFORiVhHnngUzhycwrgdv0CugIJqAjnoDcz1tckoiQkmpgrM4UuHBkchN P+h3hPV83yenqsLZZNnwJUqkUnXjDTFbjhrdyuOxUPvvpOz7WGzJuf1oiJ8R9dYlIc61K0Xqd Tt1nXUsK97bNmnLlRXJFZtD/60F3Fuxd+/xkYN2KV2/b7rBOe6vquOo3993KCX8dttzLf61eZ agnX8fzekXl8e7C9sIvzW/PK7EUZyQaajEXFScCAOdA0h6xAgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-9.tower-27.messagelabs.com!1491212720!95292087!1 X-Originating-IP: [74.125.83.47] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37290 invoked from network); 3 Apr 2017 09:45:21 -0000 Received: from mail-pg0-f47.google.com (HELO mail-pg0-f47.google.com) (74.125.83.47) by server-9.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 3 Apr 2017 09:45:21 -0000 Received: by mail-pg0-f47.google.com with SMTP id 81so115409615pgh.2 for ; Mon, 03 Apr 2017 02:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VhCtF7tcYUwxN/VzC9NCk7l2Euvb2P0oZ5/1sZpOEYU=; b=G/SSc9tIo/LCWZFYwlYp2z9K24Lul3OoOWjBB4/3si9dGLKwYsAuuav0KiS1my1mXt FgJ3qa6/yhkbpoDgXjriwWcS9S4s+HQWD/ry7n2pxXLGlVPIPJftMyh+rKcWyzSlmQBV G3PiMD/3TIV8YBOr2SOiBO9cAdi/u4uJ/K0pw= 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:in-reply-to :references; bh=VhCtF7tcYUwxN/VzC9NCk7l2Euvb2P0oZ5/1sZpOEYU=; b=hnisoJaGJB+Mhu4H9kSFMNsTxnVgDRTJ15o9B+btOwrjI2gb/3HmOUe6dkm/yAo9Cx Ew698s6nfHF+eNE2pb22LnGX8MuTkVV1msq9OKQFThWx2hLnY4F2NzjbXufTO6v96Lh2 sM1XHuPJ3ng1D/qPqSwEtyLsTfCaA/MTA7IrPUNBi8PVGHvGa/IENubN+3EAwyfKoh3R B0M1lqXU0qZkEfqbaL0Dz82lt1iXt8W8iEJUTOYcE5xQOPx0ODV08IkDeL9V+sFHtd6D FzKeJKyQaXFnLescbMunAO5UhDC8MdZLCaCVEAhnKPn4Ml6mSpnSr8KjQv/dToEXqD3E MDdg== X-Gm-Message-State: AFeK/H3wawt9fs0O4Z0qpgg6Xue1U1cW2xzXpORRiBrbiwtFUXz1QPgW2SJEjGBpps+o+BNm X-Received: by 10.84.236.5 with SMTP id q5mr20706184plk.2.1491212719893; Mon, 03 Apr 2017 02:45:19 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([202.46.23.54]) by smtp.gmail.com with ESMTPSA id y7sm24751844pfk.93.2017.04.03.02.45.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 02:45:19 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 3 Apr 2017 15:14:32 +0530 Message-Id: <1491212673-13476-10-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491212673-13476-1-git-send-email-bhupinder.thakur@linaro.org> References: <1491212673-13476-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 09/10] xen/arm: vpl011: Add new virtual console to xenconsole client 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" Add a new console type VCON to connect to the virtual console. Signed-off-by: Bhupinder Thakur --- tools/console/client/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/console/client/main.c b/tools/console/client/main.c index 977779f..03b6fb1 100644 --- a/tools/console/client/main.c +++ b/tools/console/client/main.c @@ -264,6 +264,7 @@ typedef enum { CONSOLE_INVAL, CONSOLE_PV, CONSOLE_SERIAL, + CONSOLE_VCON, } console_type; static struct termios stdin_old_attr; @@ -361,6 +362,8 @@ int main(int argc, char **argv) type = CONSOLE_SERIAL; else if (!strcmp(optarg, "pv")) type = CONSOLE_PV; + else if (!strcmp(optarg, "vcon")) + type = CONSOLE_VCON; else { fprintf(stderr, "Invalid type argument\n"); fprintf(stderr, "Console types supported are: serial, pv\n"); @@ -436,6 +439,9 @@ int main(int argc, char **argv) else snprintf(path, strlen(dom_path) + strlen("/device/console/%d/tty") + 5, "%s/device/console/%d/tty", dom_path, num); } + if (type == CONSOLE_VCON) { + snprintf(path, strlen(dom_path) + strlen("/console/vtty") + 1, "%s/console/vtty", dom_path); + } /* FIXME consoled currently does not assume domain-0 doesn't have a console which is good when we break domain-0 up. To keep us