From patchwork Mon Aug 7 08:53:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 109529 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp2481966obb; Mon, 7 Aug 2017 01:55:51 -0700 (PDT) X-Received: by 10.36.228.202 with SMTP id o193mr185343ith.130.1502096151286; Mon, 07 Aug 2017 01:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502096151; cv=none; d=google.com; s=arc-20160816; b=hyYfEh+vKPB9AVaEUICozSUqG3Cm9KtdtHlqbT6UXYuzDcEBDzjd+UMMr9K4oDPTLZ 3l13X2xCatZfV9yDqTLFQX1U8lMl8rDvAlCO/8kr9XZJ4MtHPHeengqZX4dxlsCLv5HK YSahyl0u0VgffkVwgd7zpVw25cIlQdBEbIsQtut3eKf62KA91tO4wbTKTIUvL9CWDdhD XanK2RsdmxWU1Ayj2widEky3Ls1VorbKmv8LAe0851ZnHeSQg/zAzITrvd7zTnYEI6Ow hj8/gWLAQMk0vpozrSJjsOVlvGYpCf+jd4OTbCkO186mm+XeRGc0c0IFdVpBa2Jpjv0+ qNiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=VinFKbGW/N9iWYxDU/IUOtMObQz7BGGOyQ2kukHnANc=; b=qSuFX3Y+edOMVpMBKu8yeSv1xefNwLGHFnLhEKJa2KEsbH7IP3FeOgJQ9yU9T7q9IA UEUmktRSCH0AnVSwyKHiwJJpg22pnDZ0qFyTaGf4t3CQF7SAm61KezKAk8pB2pFLAiS0 x3kh9xKj1tlPOrTfHHoWxBUB0Wee0om6M5GUAitM1tuzbH7pHXCeasHFQnGkjc4OlrMK Fn0JOJudAHMSqi83Qk1C2vCZclpMKoYXRvi4rlxfPt4wRvWD8oLxWnoJpWw/L3YDvNi1 k/en/ePLMZnZUDya9BmV3XeALlQ7N5ue8pZVJmb1Hi3uIT/4YLeQ/rQTIIFoRogLQ/Mc peig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=ZWNsmvUA; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id g189si7887970ith.181.2017.08.07.01.55.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Aug 2017 01:55:51 -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 header.b=ZWNsmvUA; 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 1dednT-0004VX-8T; Mon, 07 Aug 2017 08:53:59 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dednS-0004Tn-57 for xen-devel@lists.xenproject.org; Mon, 07 Aug 2017 08:53:58 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id C9/B0-02962-5AA28895; Mon, 07 Aug 2017 08:53:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDIsWRWlGSWpSXmKPExsVyMfTAet0lWh2 RBte26Vp83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkXXveyF/yVrthw8z9rA+N+8S5GLg4hgZmM EhOWXmUBcVgE5jFLzOn+xwriSAj0s0rc3bkPyOEEctIkXv15zgxhl0k0nfjKBmILCWhJHD01m xViVBuTxPcXU5i6GDk42ARMJGZ1SIDUiAgoSdxbNZkJpIZZYD6jRNOkXrBmYYEEifWLdjKC2C wCqhJnZ7xiArF5BXwkmudOZodYJidx81wn2GJOoPj5S29YIBZ7S9w+1sc4gVFgASPDKkb14tS istQiXRO9pKLM9IyS3MTMHF1DAzO93NTi4sT01JzEpGK95PzcTYzA0GIAgh2M3Zf9DzFKcjAp ifLGr2iLFOJLyk+pzEgszogvKs1JLT7EKMPBoSTBm6DZESkkWJSanlqRlpkDDHKYtAQHj5II7 wt1oDRvcUFibnFmOkTqFKMlx5Ur674wcUw5sB1Ivprw/xuTEEtefl6qlDjvOZB5AiANGaV5cO NgkXiJUVZKmJcR6EAhnoLUotzMElT5V4ziHIxKwrxhIFN4MvNK4La+AjqICeigN4mtIAeVJCK kpBoYOwNEjoWymVhPuXGkTDv5Fk/f090ckmb/k0NPp7vzLOricuyLVzL3Yk6cJ/eyNXnvrRs8 0ke+13HpzmKJPvKmz7Wr0U3qcNPZ2Y8DV7HedlhdI+q70+R//JJdKj/cVGZaqzidf/w8omH/y bNvzzw17ZMX/OHK5jjXuanlyFqzQwL/pscL3VZUYinOSDTUYi4qTgQAOfu5Kb8CAAA= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-12.tower-21.messagelabs.com!1502096035!76733769!1 X-Originating-IP: [209.85.192.175] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 7264 invoked from network); 7 Aug 2017 08:53:56 -0000 Received: from mail-pf0-f175.google.com (HELO mail-pf0-f175.google.com) (209.85.192.175) by server-12.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 7 Aug 2017 08:53:56 -0000 Received: by mail-pf0-f175.google.com with SMTP id h68so17543492pfk.0 for ; Mon, 07 Aug 2017 01:53:56 -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=AGHJrnwneXKl3Z1bjGKh+k5Ixw7YK+0ghFT9u/p0sak=; b=ZWNsmvUAFyJQ58eqvLvwgDIfkmFzFuYdHIO9YTgzKZFsEZnMVDhzVVH+IpSczRR4ki gvXJu4wU3DTG+YoEi3yrTjuK4tRaDJmLmrU4apRpLH19Uow3yM8An4waDXFU9WJDhmNN yN/SKWW8ZnAK0XXdSmjjNBoScj9GaL98f2pTY= 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=AGHJrnwneXKl3Z1bjGKh+k5Ixw7YK+0ghFT9u/p0sak=; b=rIXOrMJQct2pyc9lASCayU1LWGJkVbMP1HrpKxe6PQ2rnzrH35JXEqYvDcZsbY9USJ 0qDajWI7VzbwvG2W4kCwzI2oL2Ix5BYSGqS/HeIdUNm0QtGt5D1axdYek+kAlhAiiGaR QukyS6jAAIWp+PAu2DMI0TWs3Wxtq2vjQ99sL7S5fUJL4HNt5fLH3ffhMdafcIjMrP/R BqpXZ9Dtgp46AhbHgS9dwNfrN9zqCYVF5Cw39j7KzJEattpaRF3KqwGWoBlHlJrH9Fe7 QfnwuzKyeiP7Uv1K5VgwxuAAdlJxrmzP84vH9+l+1ATk/EucK7M3Yby57zeCwthhu/4b zSXg== X-Gm-Message-State: AIVw110vdhQPgwF/kDBmUnL2PMNokRuNDVR+aDL12X38k+nAfhkT2WbE vSD2QQQVCBA1cVvjcZgneg== X-Received: by 10.98.31.7 with SMTP id f7mr11337916pff.27.1502096034943; Mon, 07 Aug 2017 01:53:54 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id p77sm12604047pfi.153.2017.08.07.01.53.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Aug 2017 01:53:54 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 7 Aug 2017 14:23:01 +0530 Message-Id: <1502095997-31219-10-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502095997-31219-1-git-send-email-bhupinder.thakur@linaro.org> References: <1502095997-31219-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 09/25 v7] xen/arm: vpl011: Rename the console structure field conspath to xspath 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" The console->conspath name is changed to console->xspath as it is clear from the name that it is referring to xenstore path. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v4: - Split this change in a separate patch. tools/console/daemon/io.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 30cd167..6f5c69c 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -95,7 +95,7 @@ struct console { int slave_fd; int log_fd; struct buffer buffer; - char *conspath; + char *xspath; int ring_ref; xenevtchn_handle *xce_handle; int xce_pollfd_idx; @@ -463,7 +463,7 @@ static int domain_create_tty(struct domain *dom) goto out; } - success = asprintf(&path, "%s/limit", con->conspath) != + success = asprintf(&path, "%s/limit", con->xspath) != -1; if (!success) goto out; @@ -474,7 +474,7 @@ static int domain_create_tty(struct domain *dom) } free(path); - success = (asprintf(&path, "%s/tty", con->conspath) != -1); + success = (asprintf(&path, "%s/tty", con->xspath) != -1); if (!success) goto out; success = xs_write(xs, XBT_NULL, path, slave, strlen(slave)); @@ -546,14 +546,14 @@ static int domain_create_ring(struct domain *dom) char *type, path[PATH_MAX]; struct console *con = &dom->console; - err = xs_gather(xs, con->conspath, + err = xs_gather(xs, con->xspath, "ring-ref", "%u", &ring_ref, "port", "%i", &remote_port, NULL); if (err) goto out; - snprintf(path, sizeof(path), "%s/type", con->conspath); + snprintf(path, sizeof(path), "%s/type", con->xspath); type = xs_read(xs, XBT_NULL, path, NULL); if (type && strcmp(type, "xenconsoled") != 0) { free(type); @@ -646,13 +646,13 @@ static bool watch_domain(struct domain *dom, bool watch) snprintf(domid_str, sizeof(domid_str), "dom%u", dom->domid); if (watch) { - success = xs_watch(xs, con->conspath, domid_str); + success = xs_watch(xs, con->xspath, domid_str); if (success) domain_create_ring(dom); else - xs_unwatch(xs, con->conspath, domid_str); + xs_unwatch(xs, con->xspath, domid_str); } else { - success = xs_unwatch(xs, con->conspath, domid_str); + success = xs_unwatch(xs, con->xspath, domid_str); } return success; @@ -682,13 +682,13 @@ static struct domain *create_domain(int domid) dom->domid = domid; con = &dom->console; - con->conspath = xs_get_domain_path(xs, dom->domid); - s = realloc(con->conspath, strlen(con->conspath) + + con->xspath = xs_get_domain_path(xs, dom->domid); + s = realloc(con->xspath, strlen(con->xspath) + strlen("/console") + 1); if (s == NULL) goto out; - con->conspath = s; - strcat(con->conspath, "/console"); + con->xspath = s; + strcat(con->xspath, "/console"); con->master_fd = -1; con->master_pollfd_idx = -1; @@ -712,7 +712,7 @@ static struct domain *create_domain(int domid) return dom; out: - free(con->conspath); + free(con->xspath); free(dom); return NULL; } @@ -756,8 +756,8 @@ static void cleanup_domain(struct domain *d) free(con->buffer.data); con->buffer.data = NULL; - free(con->conspath); - con->conspath = NULL; + free(con->xspath); + con->xspath = NULL; remove_domain(d); }