From patchwork Fri Sep 22 08:23:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 113986 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3011238qgf; Fri, 22 Sep 2017 01:26:10 -0700 (PDT) X-Received: by 10.36.17.200 with SMTP id 191mr5500511itf.37.1506068770452; Fri, 22 Sep 2017 01:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506068770; cv=none; d=google.com; s=arc-20160816; b=NPWz2/CfU7z3TOKwiMwjIJRMtClJEKL6eOcI/Sq8LiWlMzggy7LXkWgB74UqTT1f44 f97QDdgkGEdVWa/24qxIjGYaBws0YHz6Fh2g5AlkFGjV4UfYvAL3UoVpgnIACItUZ/GM hY3MMsD59USNQmqUR8n88/Qm51tOrOHYsng3tLL/W6b7CYDk2cQhNnBpJ02AM5xdPAVz bn5sUiKSTrCOAOfESDBoPedfin10D/et5CKBFZMf3DSzYU6oMPltFUn5e5b0PxLxusZI l7xruRBOfsU64UsaMeVecfsbw8Khn0iioiSpQsAUThJ1A7eU3XOcwEoMSNQejjTKDVJv yL3g== 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=eQncT9CQa+OsFOnbI3WEAQCineVqs3+f9OoKnWdiGPveoL76BpeE+UYzG/4lEgOTMR BQPVL8bSV2hMHg9GqGd24yngEqDN/pKomaPO2Mw/uTo9B0IUvMJn/F5q/zW8VwO3T3Ou rJ6+7azyWPAj7AHac4/VJvZSJWI58Xiws4eppOjibc+6ZiVkXM7yGHqnXWn32jNEiAFf GTRTfIb0eIhvJjthS9mb/6vH5ko0LJni/kRF9xtKPluYwQzbhsEIY536573PPEZMMw82 f0k/5jQ8iDqNXl6zXS2rQvUTc3B1TeSMOW5OX44ZUUHkX+ByTI3rz8kmmcfKH1ofoe+u VWKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gnsEl7rJ; 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 y70si3653522ity.2.2017.09.22.01.26.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 01:26:10 -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.s=google header.b=gnsEl7rJ; 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 1dvJFm-0003sM-BX; Fri, 22 Sep 2017 08:24:06 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvJFk-0003r1-Vf for xen-devel@lists.xenproject.org; Fri, 22 Sep 2017 08:24:05 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id 71/E1-17770-4A8C4C95; Fri, 22 Sep 2017 08:24:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBIsWRWlGSWpSXmKPExsVyMfTAZt3FJ45 EGixboGzxfctkJgdGj8MfrrAEMEaxZuYl5VcksGZceN3LXvBXumLDzf+sDYz7xbsYuTiEBGYw SvxatIoNxGERmMcsMfnLB3YQR0Kgn1Vi8eSlLF2MnEBOnsS59r1MEHaaRPvlT2wQdpXEzafr2 EFsIQEtiaOnZrNCjN3BJLFr+2WgIg4ONgETiVkdEiA1IgJKEvdWTWYCqWEWmM8o0TSpF6xGWC BRYtqaGJAaFgFViRcz3oLt5RXwkfh6eQnULjmJm+c6mUFsTqD42v8bWCD2ektsvXGVZQKj4AJ GhlWMGsWpRWWpRbpGpnpJRZnpGSW5iZk5uoYGZnq5qcXFiempOYlJxXrJ+bmbGIEhxwAEOxhX LQg8xCjJwaQkyvv4yJFIIb6k/JTKjMTijPii0pzU4kOMMhwcShK8O48D5QSLUtNTK9Iyc4DBD 5OW4OBREuENB0nzFhck5hZnpkOkTjFacly4c+kPE8eBPbeAZMfNu3+YhFjy8vNSpcR554M0CI A0ZJTmwY2DReglRlkpYV5GoAOFeApSi3IzS1DlXzGKczAqCfNeB5nCk5lXArf1FdBBTEAHla8 GO6gkESEl1cBYz1e4aVddaub+XtvVVZrH1T8ovp8q+e6j4b0qz8BwyRoh67CX1dullNX6uK0Z 7Hc41n9LmPRppQ/TiV+vfhilMS3SEKzq2czy+LlKxgvhVStO2CUdk9z48amu/vyG+R2Kdcedp F1m7nCUOHa6peKHTI5ldlz1hISdudufHN0aY2brLDt343IlluKMREMt5qLiRAAZBNY1ywIAAA == X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-12.tower-27.messagelabs.com!1506068642!116543932!1 X-Originating-IP: [209.85.192.179] 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 14746 invoked from network); 22 Sep 2017 08:24:03 -0000 Received: from mail-pf0-f179.google.com (HELO mail-pf0-f179.google.com) (209.85.192.179) by server-12.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 22 Sep 2017 08:24:03 -0000 Received: by mail-pf0-f179.google.com with SMTP id r71so229231pfe.12 for ; Fri, 22 Sep 2017 01:24:03 -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=gnsEl7rJxvAujzAVho4rWTPJHxEAdvi8nlah/+daGXUV7C2EdtOCuNmLDi09cwjlPs gSQJrmC+1z3gArHEmTBmYOBccQSSAMKgmQxDoP4BFax5TzatsuNyZLInX1hUdUk7crSH UVikrXxqmCW2k+9MO2KwPblVtf/vwYS3up7z4= 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=QeKl9EtJ7Q+sQIk2gLPP/utJP/xSPrXczbCqNmvVO9SWafe3rl/bdSXD8OuwY8JI3D aqjcvIqdT7jag+saHnAFSX5lsj/LwI2FDsNvRlciWRYMPcXVJsOl+wDBiN4+GF+x9Fg8 aDr/ZnZl4PWyfsMzhz8eBXs5H5w5265bTwxuFUiWEahHv1fNEPWxMNPTvUJ9yKpjiI5f p7cqR7b06Iq0oxlDbN6DN4RuUcPFncxHE0GM+FFF5OLA7405GgjOYpg52pqxUyT58daK 4V6oYmt+12unOniF812waxunnHEOeYd3yUr44tGZ0oFL/ihHigxyKyLOpl/mTo2QbaSh zblg== X-Gm-Message-State: AHPjjUhr+CqzxqRpMtt23YBGlSh/2eEAB0LAJuxvP4PIifsg70tnNJTz AJLY5ckGjR4ykKJPUm34I2n9LBai1ZY= X-Google-Smtp-Source: AOwi7QCT9oeq60+R3qoycwY1xyk5PV1cqN85ccOHXNsW7rR6BffDbcNF+In/cMlWMPtyzlVU7WJuYg== X-Received: by 10.98.178.204 with SMTP id z73mr8547664pfl.107.1506068641677; Fri, 22 Sep 2017 01:24:01 -0700 (PDT) Received: from blr-ubuntu-linaro.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id f74sm5569284pfa.36.2017.09.22.01.23.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 01:24:01 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Fri, 22 Sep 2017 13:53:08 +0530 Message-Id: <1506068606-17066-10-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506068606-17066-1-git-send-email-bhupinder.thakur@linaro.org> References: <1506068606-17066-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 09/27 v10] 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); }