From patchwork Mon Aug 28 08:55:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 111120 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp4548158qge; Mon, 28 Aug 2017 01:58:57 -0700 (PDT) X-Received: by 10.36.254.67 with SMTP id w64mr5005699ith.20.1503910737067; Mon, 28 Aug 2017 01:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503910737; cv=none; d=google.com; s=arc-20160816; b=RPLtih9ez5ExB+zQWqtJbfsJMDkmTBXndlNMzzDWpObIWl/t18ST0OnW3eiHD9cL5u DVuD7wucUMIHZmzHUOL/uP9pATyD9Stx88UfQZlFRsnQkjwJEK/hHh4UiyU2bmWxE/B+ D63HGqYpOtCSmuOTg4X4JylUzkxdtOUou0KLVmOI7MU4VLpC65tIAwlAtzsxvxaeRpos X/cxGIP8nfkTy0YLAYGR3jbunm8sk+AHZ2aULVPIO3AWmlpNzA1hQAxy1Ardnwe1R71v qx65dI9m2plkx5wPKHBhwulXAQyGYnQvU8n3A57HO7Ht7WgCEZgKs8DVUL4wf6Nn2qLx hhJg== 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=A4pYg5hd50zGJvLPyqeyeZ2MKNnKC5rjybtIQnm7U37qzTWMdG7bdjfFyR2w/k1quS 3K0vbwfYmb+O9my4V1zqDl6PO9uFelCtBYYgIrmeU23OPrRODk5CvqHy+USE+Ufu82pE D6g4Asvaop7RZpdl/O/CN1fMf1wDE6dBpWCjETCYipRbk1Wd0/wEgnePmrWo3klPYvyt X0J8bXnLF46olewfPiO43e5FeA1XBoDn/QZz3Si5+4cOIcEZzkrZvszq84nOVqC0KfJy l2sOVX/DT4KEYlfLnt3lrMu6olGPez+uKEsprTpA5AA3C2MUDMoDG2UCKhiIj9rkRHGt p0eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Qqh0BxLW; 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 z69si7460092ita.97.2017.08.28.01.58.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 01:58:57 -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=Qqh0BxLW; 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 1dmFqn-0004uV-9q; Mon, 28 Aug 2017 08:56:53 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmFql-0004sx-JJ for xen-devel@lists.xenproject.org; Mon, 28 Aug 2017 08:56:51 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id BF/1B-03044-2DAD3A95; Mon, 28 Aug 2017 08:56:50 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRWlGSWpSXmKPExsVyMfTAZt2LtxZ HGmycZ2XxfctkJgdGj8MfrrAEMEaxZuYl5VcksGZceN3LXvBXumLDzf+sDYz7xbsYuTiEBGYy Srzee44RxGERmMcs0XvgLDuIIyHQzypx5/VjoAwnkJMmsWJLExuEXS0xufcEK4gtJKAlcfTUb FaIUfuZJDZ3v2HqYuTgYBMwkZjVIQFSIyKgJHFv1WQmkBpmgfmMEk2TesEGCQskSDy6d5wdxG YRUJVo7P/KDGLzCvhI7FqwC2qxnMTNc51gcU6g+I61d9khFntLdL3+wDqBUWABI8MqRo3i1KK y1CJdIwO9pKLM9IyS3MTMHF1DAzO93NTi4sT01JzEpGK95PzcTYzA4GIAgh2Mv5YFHGKU5GBS EuXdWbE4UogvKT+lMiOxOCO+qDQntfgQowwHh5IEb8hNoJxgUWp6akVaZg4wzGHSEhw8SiK8H 0DSvMUFibnFmekQqVOMxhxXrqz7wsQx5cD2L0xCLHn5ealS4rw+IKUCIKUZpXlwg2Dxd4lRVk qYlxHoNCGegtSi3MwSVPlXjOIcjErCvAdBpvBk5pXA7XsFdAoT0CmKggtBTilJREhJNTAePDi hn32X+cQaYIjEGvXM7bHk6Z6+TF/4bdhDibCEw18qV7C/FnReo5dpaa1zfm4dn7mEy/eipr8z C9en6WSKKqt/5tP7vvCI6do9llWV7DuCw8VUktTOiVx86xUzS6Cx8qpZy6+ef0lCUzqsTVX0z q1onvkm4H/gxtsvd1pHLf61X/SwjhJLcUaioRZzUXEiADU4Fgq6AgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-13.tower-27.messagelabs.com!1503910608!104229544!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 22400 invoked from network); 28 Aug 2017 08:56:49 -0000 Received: from mail-pf0-f179.google.com (HELO mail-pf0-f179.google.com) (209.85.192.179) by server-13.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 28 Aug 2017 08:56:49 -0000 Received: by mail-pf0-f179.google.com with SMTP id r62so14494442pfj.0 for ; Mon, 28 Aug 2017 01:56:49 -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=Qqh0BxLWbmRNUJxMBwhWdAGZLxwxBmsyc9/WRp3+Y3z/rXPwEQ+mUkq1zCtkm9ezZw xlFJhLDY973ERJlHAbPwK9OauKmmuaNmhszpxWyEgsmq/UJjIbX47YTzPCYKGq10x1eN Zl28pbcL2xvw0aooDYhEOgvF53Bj/1Jb1AO1M= 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=AqvHeDMkeyPd9CpJSDRTUGDd8bkqF3Akq+ogl/nTyXIl2yvTbZNutjq/5UwnRzv/ZP 2m4wniow4RRglWfI+vP6HqV3gDNkJaKCygKoUdvT98SadtCMFnOCs2i6brj5gVuwnqWT MsyLuoKppezcO5vDp3I4Lny1Mwvhyl/oE94+L7gXUvBy2wfKtaInQpsHGYxpXzjIuAJ9 WWMrlDfcN2ekJPdS48AVhG13jiyPvy38waqg1pUFDgqOV75bN3uzNrnG5AtvV//1FXfX fbFtL7iYiLDtFVrLCac4PrR+RiNmJ7D69grPk+S/BngaA+TJfNSZD0Af4uWoUZKr6ov1 HPcQ== X-Gm-Message-State: AHYfb5hjAxT2DsXZqw3xwi7xFdeKi1+UNwmLrmYs3ajB8j8OC7Tq5tCz P+R/JhWkheTZRf6zgItQLw== X-Received: by 10.99.121.138 with SMTP id u132mr6919835pgc.424.1503910608233; Mon, 28 Aug 2017 01:56:48 -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 d88sm21713569pfl.158.2017.08.28.01.56.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Aug 2017 01:56:47 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 28 Aug 2017 14:25:52 +0530 Message-Id: <1503910570-24427-10-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503910570-24427-1-git-send-email-bhupinder.thakur@linaro.org> References: <1503910570-24427-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 09/27 v8] 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); }