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: 9659157 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 0073E60353 for ; Mon, 3 Apr 2017 09:47:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0CC21FF61 for ; Mon, 3 Apr 2017 09:47:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5BA926E39; Mon, 3 Apr 2017 09:47:21 +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_SIGNED, 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 8B3761FF61 for ; Mon, 3 Apr 2017 09:47:21 +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 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" X-Virus-Scanned: ClamAV using ClamSMTP 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