From patchwork Mon Jul 17 13:06:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 107945 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4495209qge; Mon, 17 Jul 2017 06:09:30 -0700 (PDT) X-Received: by 10.36.150.2 with SMTP id z2mr5072457itd.6.1500296970921; Mon, 17 Jul 2017 06:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500296970; cv=none; d=google.com; s=arc-20160816; b=g1jwYxL8DGVzOx83c3HJ+3m98Ob0jSBIAc97IO4c2M0C9IWzOCFRb4JEoU8HWiaOSw 27maq5Fu5z8zVa6ahzHx6HTmsufG/kDPz4jKvKcYrYCI7PL1c1xD5vHf2j/OB24owbCx +cVaDLuvpRxlV8wM6EP3lwda0T7lZBGv1SC2toLIBQZN5RoKCfWs3bqdLFvsyRkCJRvo qm6pcTbZqVnGz9p3YVLKBGaIsdDYaqA6x6pSHlG/JQ91nxJuGjQrJYFDZWrCy4Od64QL HbkpiAKACZKGHUQE0G3WC4SWFy/vMil2+Q8lWwJnz+HMzMgw6UI182aT2QW3saS9pqM5 b98g== 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=fgYnVAMew++XyqT6dW/26a4RXH+wdUaSQEfJ7w5O3NJHRNNcjAx//HRDIGiLyzOdTc 1o6nCOnEIlgK2CkNMSBP9zS0AjatFeOdDGAUrr5a5svBrCfQCo0zsvNJL1btSJMI6BFc Oz0jHRk3sN0rbmU2qU7MDZzT4EQbldovItKHl/5vNOxmcf7bq3bzr0OzP827gd1Yc/0y kOCDdPdRaF/VeMzZr7phNM1Zi39MnWW4//xhDO+k4GnPCDoQgB88bgejzvxfhgaeI219 /0wAnVabHFH8uST28M9oifhCxZNGOSglTf1tuTnYH9SLATSjbogOYVWiJdjcxCcwNePr gCBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=Hj6NJee/; 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 k81si19418317ioo.264.2017.07.17.06.09.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 06:09:30 -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=Hj6NJee/; 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 1dX5kL-0004LL-SB; Mon, 17 Jul 2017 13:07:33 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dX5kL-0004KZ-2t for xen-devel@lists.xenproject.org; Mon, 17 Jul 2017 13:07:33 +0000 Received: from [85.158.143.35] by server-5.bemta-6.messagelabs.com id E6/93-03368-496BC695; Mon, 17 Jul 2017 13:07:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXiVRuspTt5W06 kwa7/yhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aF173sBX+lKzbc/M/awLhfvIuRi0NIYCaj xOKPN1i6GDk5WATmMUt8npEMkpAQ6GeVWLr5HVhCQiBNYtbMRcwQdrnEvK3HWUFsIQEtiaOnZ rNCTGplknj7/QxbFyMHB5uAicSsDgmQGhEBJYl7qyYzgdQwC8xnlGia1MsGkhAWSJDYMvcUK8 RmVYm1R7+B2bwCPhKTuz8zQiyTk7h5rhNsMSdQ/MyG1UwQi70lbh6ZyDSBUWABI8MqRo3i1KK y1CJdI2O9pKLM9IyS3MTMHF1DAzO93NTi4sT01JzEpGK95PzcTYzA0GIAgh2Mf+YHHmKU5GBS EuW9yJYdKcSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mC131rTqSQYFFqempFWmYOMMhh0hIcPEoiv FtB0rzFBYm5xZnpEKlTjMYckw5s/8LE8WrC/29MQix5+XmpUuK8eiClAiClGaV5cINg0XeJUV ZKmJcR6DQhnoLUotzMElT5V4ziHIxKwrzLQabwZOaVwO17BXQKE9Apwr5gp5QkIqSkGhg9fSc oxuRVpPz9oc/AejB4ztSkTx8/TGJ/dCBERHiJ7eS2xc0T9ZSzoj83idlqPrkmcOJv+67VsecE vvpkVHSk9Qnl/FCQWrC7veONPRvzphVqxgdLvAxuZeZL2jPeOnvi54HCU58/1nx2UjZ4ZHptr 7kEA8ua/1sLv61P7ml96tHdM+drqIsSS3FGoqEWc1FxIgCheHmduQIAAA== X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-12.tower-21.messagelabs.com!1500296850!73601689!1 X-Originating-IP: [74.125.83.42] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 56406 invoked from network); 17 Jul 2017 13:07:31 -0000 Received: from mail-pg0-f42.google.com (HELO mail-pg0-f42.google.com) (74.125.83.42) by server-12.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Jul 2017 13:07:31 -0000 Received: by mail-pg0-f42.google.com with SMTP id v190so21520742pgv.2 for ; Mon, 17 Jul 2017 06:07:31 -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=Hj6NJee/MK53sC8Nbi8hjLbU3HNTt2UP0ksFgBkAcQ/Eu4wgGHiX4nJO3ZSOBVFRwW yrcu6jib0UVlesJPChBE6J1rOgU/UWtsMEsowPXqUebVXMIjaWBsnJKNNm0UvhupmWN3 y9ogJnJZccZRlIXui814Dbr8f13JQ7cy/i9uQ= 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=QVEvUPMCd1IbQ21EvT7yICOslqlcmmMZ3MpuQmh9IHJeqnwtyNd2ncIw1JBYXaOTHZ 7zdhsADkqaK8be++0xUH+hxBaquP4vYtoaUCxRKkKEPrYKo8i4uB3digNTZ57GCGA3p/ X48UlYt7xfVgtSn7zGDFcFMNnmfGDkGCXPLvmlwJzDCALG1GLdLiPWGJME9POVEEdf+o uU0EpFYzosIpGNL+sz82vj5T0LxVtQfLHmv4ywSsz2DuM5YauJoFvETR0E3fWcwS2Cer 8xYfCSzUOwbrsdK5mjUDTqBGowM9qH6vGhN2+MW4UEuO7rQFYtY2bqoKWw8XmNbZlKAt j/mg== X-Gm-Message-State: AIVw1131NHJqH4sQ95mn9vNj0FjKPRfclNWrnBuykCw/l+at4W96s4XX xvSg5bxKg2z/ont0Wm4Lpw== X-Received: by 10.84.254.7 with SMTP id b7mr6406013plm.132.1500296849929; Mon, 17 Jul 2017 06:07:29 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id z69sm15705665pgz.42.2017.07.17.06.07.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 06:07:29 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 17 Jul 2017 18:36:39 +0530 Message-Id: <1500296815-10243-10-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500296815-10243-1-git-send-email-bhupinder.thakur@linaro.org> References: <1500296815-10243-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 09/25 v6] 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); }