From patchwork Thu Jun 22 07:38:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 106169 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2327142qgd; Thu, 22 Jun 2017 00:41:22 -0700 (PDT) X-Received: by 10.107.167.199 with SMTP id q190mr1009363ioe.110.1498117281994; Thu, 22 Jun 2017 00:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498117281; cv=none; d=google.com; s=arc-20160816; b=CCyglaJuQXK8GUenSt4SGQhkwV6zxWO2f9TjCQ8/Qj9QV4zesFngz210d9As8nf8xd m2xNSQW0IW58ZRO47zdduE3v/EOnvK3UhFyvDJG2p4MZJCWy/zS0AG+6Y8eH2FXkjyHd ZpkfdtsfBuT4GZR78oSjzaoQrcukjlTrpeYVoWXeMFBr0KaxGc2/1TlXkwryENAayfaB VpeyEu1LfyPp4KGjToGx/rXsu7WB8pqJSHXIAd6RL6+z3B7PVGPO1IHoTEqzCwVO5eNe ulcnFVRy6i0vMK2oYRgrLHGFgZ8gOZ0r80Gs33wTrzUsY+eujO7OCze8e0aAI1VrZ1A4 Q0YQ== 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=XrfDSSB1XjSuerrEg6bweFztwJhi2E5WcwBzcBPfhkY=; b=fNDYcGJzhlZ7vxeoFdaJWwVIf83sqTlB5sVfoLfGyq+Iqc44DdHG3sffOYN/3EJq+/ 51byYs66aQPlMJr+GARxeSDKkGddR/Tb0vJ53TFH3mLnBY+Lgrw6o0ULTvscqfmJ6lWF Z2qalaYk4FzQU5kh7WoSB77UvwTgwSLXFbMJHq3yO0tjHycXJ/rcvj7+V4XxPJfsuL3n 3hNKzLJcvQNiB/PHEbCjhmUNxFa8wS3kIjD3ZjJZXWOCpLGBpxoMJcXt45j7rSxercaE pHpLF4yyU6lOdE7LQAQJo7/q7RdRwCP6Md6hiBz9tUgNcQyvnNleSh6jw8JKrihvwoKn 386A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=Vr8ePQh0; 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 b5si680230iog.279.2017.06.22.00.41.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 00:41:21 -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=Vr8ePQh0; 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 1dNwiI-0005jR-0W; Thu, 22 Jun 2017 07:39:38 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNwiH-0005hq-4Y for xen-devel@lists.xenproject.org; Thu, 22 Jun 2017 07:39:37 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id A6/FD-01730-8347B495; Thu, 22 Jun 2017 07:39:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsVyMfTABl3zEu9 Ig+89ihbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8b5y5vYC+ZIV5ze94m5gfGZWBcjF4eQwAxG iev7JjGDOCwC85glLmw/zAbiSAj0s0rseTmNvYuRE8hJk3h1s4cZwq6UWL7+GxuILSSgJXH01 GxWCHsfk8SVvzpdjBwcbAImErM6JEDCIgJKEvdWTWYCmcksMJ9RomlSL1ivsECCxMPFu5hAbB YBVYl9d/eDzeEV8JG4t6mNEWKXnMTNc51gezmB4it2LGSH2OUtsevMZJYJjAILGBlWMWoUpxa VpRbpGhrqJRVlpmeU5CZm5ugaGpjq5aYWFyemp+YkJhXrJefnbmIEhhYDEOxgXNnufIhRkoNJ SZT3f553pBBfUn5KZUZicUZ8UWlOavEhRhkODiUJXuVioJxgUWp6akVaZg4wyGHSEhw8SiK8L SCtvMUFibnFmekQqVOMxhxXrqz7wsQx5cD2L0xCLHn5ealS4ryiIJMEQEozSvPgBsGi7xKjrJ QwLyPQaUI8BalFuZklqPKvGMU5GJWEefWLgKbwZOaVwO17BXQKE9ApL454gJxSkoiQkmpgdCr VKl3bNT0karaZXt8s9uM3RF7uiuvilzaq61STNJNZbSGgaZz17LBe09Vpk6VN6qdvtfrw9/D0 T8errZTu/xNtObrn06zFTNe77YzWOun3GBiqvQzqlRbZfSL4rdU0w802/w/ryJlMzZp/T97rR e/0zWHO52+IFny4lr7ZhT3LpTAoQE1NiaU4I9FQi7moOBEA5s/scbkCAAA= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-8.tower-206.messagelabs.com!1498117174!104400575!1 X-Originating-IP: [209.85.192.176] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21534 invoked from network); 22 Jun 2017 07:39:35 -0000 Received: from mail-pf0-f176.google.com (HELO mail-pf0-f176.google.com) (209.85.192.176) by server-8.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 22 Jun 2017 07:39:35 -0000 Received: by mail-pf0-f176.google.com with SMTP id s66so5120860pfs.1 for ; Thu, 22 Jun 2017 00:39:35 -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=MpMFLIYj7J9yQ90VLo2ETIWIMt6mnltxIbQjgHJnEQg=; b=Vr8ePQh0gM3OI8yLNfv3o91br67GMNghkGpWMtkgVtzCsqpHDobNdNhUQ4DsLrQaB/ pOqGbZDvF25jgI+Uanz8d1qWFqXWLmG2EIH6amcSbkW5/15zo4w2OoE83g3IDIgBjSz/ DgIrChZsOO1pu3sWDfx+El9JhZ1RNMcAZsQJI= 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=MpMFLIYj7J9yQ90VLo2ETIWIMt6mnltxIbQjgHJnEQg=; b=iHTPQb7VQN2Cwzy1GbqZZHKRzSoU9GA4N/ottso3JxeYD9gEUEq6A+CoafrF0Vuxwe ligJcodPmVcI44aPzok968b82ZxBQg6YFhkm/UHlwb5KDVEXFlkMEU1djDSK14t58HJz 6gZdTTK8YRDRInbGHgAJwERp/aGWjJAWdDDUg7JYVhasAFLj+SxGX3/mPqO91I8W6nW8 Qd/D+Tp6KsfSOwpB/rVm18OUqltiYWLif0/vw127CA73D8xw7CiNdVmgmJYkb4w/upiN Opdu3g24RvyG1hHsWwsdV83kter9HdN49AvyZkKR+LQIVJAyu1neQb/m11Vton5HE2Ub krsw== X-Gm-Message-State: AKS2vOzTymnHW0yeCh7aNptuc99k2SfIUnvNWzCd8LLmO+1zdNBjtsK9 CKuPfTZidXt2F4L0nvEG+w== X-Received: by 10.84.231.135 with SMTP id g7mr1419735plk.110.1498117173864; Thu, 22 Jun 2017 00:39:33 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id w69sm1883591pfk.107.2017.06.22.00.39.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jun 2017 00:39:33 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Thu, 22 Jun 2017 13:08:46 +0530 Message-Id: <1498117132-27139-12-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498117132-27139-1-git-send-email-bhupinder.thakur@linaro.org> References: <1498117132-27139-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 11/17 v5] 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); }