From patchwork Mon Sep 18 10:31:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 112897 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3501313qgf; Mon, 18 Sep 2017 03:35:03 -0700 (PDT) X-Received: by 10.107.3.10 with SMTP id 10mr20591223iod.297.1505730903425; Mon, 18 Sep 2017 03:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505730903; cv=none; d=google.com; s=arc-20160816; b=kA52fUKcXF2YAYAf1dkf8Hoe8mOhBSsV4mdBGZCw+MbegEmmCg6Sa49OYByevaI+de DUn6urCBZUjHhYK0qRcKXS1CSvbh6FfU14MtlnH2WZ9BZnWxswcJgzk/DWPrE8HTIib+ V+Po8P2Zj+oybBUSHuZAU6Z3qhgNLgAoI7U+21gPPWxMKfpFeWONgZ5XpHW9+iWqVIkZ hgWOMT2vAG+E+PnlYewSdgj1H092V1mlQVGJg22LTM8Tan1Xf06vU+iO/m/zynbwPGVo ddGnRtqJffBNA2OO/z6v3B4zDGneGJgHfz94q+XPpNCvaDI65WMIEc/T+JpyHUWVPc+4 BRfg== 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=vOhmUYmJy/SPIplZ7IRTu6YykTXJregCkFqxJgqSPyqvFp+pcJrWTd5nn8Tz++64SY DZgZdY0xGYgyqybyafcaHbFa64MekrJF9jHjgWKkjRIckdd/7iNR2i9KGqSt6s2AJoXQ +4GDLm43YZovN3ii2cSM1ufsKasBgVsYSIIn0TLcJNPnFxDRU6QJNgKJlv9Bz0R49Jop MQbjtsGEnrgubuJB9ksPzxjRUiebdvYnMLSORSk1RebWi6fK7Ft6hDe/BXtpAW+t3rP3 Bni4ZU+9xh2NvEsegzQloV0S/8pPx2NWqVEfmrepQ9nQE273FgmEVm5iDx4Ywnvd1xDH UtwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JHZGYk4E; 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 g9si1384422iof.137.2017.09.18.03.35.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 03:35:03 -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=JHZGYk4E; 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 1dttMB-0001tu-HI; Mon, 18 Sep 2017 10:32:51 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dttM9-0001rY-V2 for xen-devel@lists.xenproject.org; Mon, 18 Sep 2017 10:32:50 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id A8/E9-30688-1D0AFB95; Mon, 18 Sep 2017 10:32:49 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPIsWRWlGSWpSXmKPExsXiVRtsqHthwf5 Ig63zZS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1owLr3vZC/5KV2y4+Z+1gXG/eBcjF4eQwDRG iTXdz9m7GDk5WATmMUts3hwMYksI9LNKTJnHCGGnSXQ09DLB2G3tJ9gh7EqJf3sXgtlCAloSR 0/NZoUYuoNJ4sTWFUDNHBxsAiYSszokQGpEBJQk7q2azARSwywwn1GiaVIvG0iNsECCxMVV5h A3qErsvzOdDcTmFfCR2HV8IRvELjmJm+c6mUFsTqD4+fUPWCH2ekvM+3WFcQKj4AJGhlWM6sW pRWWpRboWeklFmekZJbmJmTm6hgamermpxcWJ6ak5iUnFesn5uZsYgcHGAAQ7GA82Ox9ilORg UhLlFY3cHynEl5SfUpmRWJwRX1Sak1p8iFGGg0NJgnf1fKCcYFFqempFWmYOMOxh0hIcPEoiv OtA0rzFBYm5xZnpEKlTjMYc+/bc+sPE0XHz7h8mIZa8/LxUKXHeOpBSAZDSjNI8uEGweLzEKC slzMsIdJoQT0FqUW5mCar8K0ZxDkYlYd5HIFN4MvNK4Pa9AjqFCeiUlh17QE4pSURISTUwuvF dffhW7pDv/SDhN5NPXwr5fepR8b0fs88+8Q/K8Xm+aN/Tptt3E81nstSd8pZ0Dyr85mJautxu 2lc2dwGhuSJ+82qZlGrlS35vWRi9RntihdHfPWxRkhrzAw4uYtjxzHSnY+2ukpMHPy/48k9+t 5hh84THnj2ioVtl176+7/D2ELv9khP7+pRYijMSDbWYi4oTAW4GsUDCAgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-4.tower-206.messagelabs.com!1505730766!112001224!1 X-Originating-IP: [74.125.83.49] 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 63423 invoked from network); 18 Sep 2017 10:32:48 -0000 Received: from mail-pg0-f49.google.com (HELO mail-pg0-f49.google.com) (74.125.83.49) by server-4.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 18 Sep 2017 10:32:48 -0000 Received: by mail-pg0-f49.google.com with SMTP id i130so34374pgc.3 for ; Mon, 18 Sep 2017 03:32:48 -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=JHZGYk4ErW6Cb9kmPPeWInR1aYQI2zH1Mj4mUT2HieEUgF6SN7O5sA5+9oCiaHrdDP zzuHbNtfUe9ZBn1q1AwJnl9lrpInbMumLGxjFpNGy972HJMl4Te9s/VB+a+nyvnmfE73 bY9ThN0Lp1DUOtNUzmsV7Sv2e86ExrnPUY8sk= 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=SiDSt+dP24lnV4qEdieySNREw7rMXxQihgsBcXJ1ZnQ9OSHalbIVvoa7VEpe85YxUc YIavLtMryqPLWFhtEveM+UHX4tAem1PEMxDNLy7xQEyAXLo+qP2iKN6qBp80xUOmbZ9S whxj4g2wK3P9D5Yfd1f8J4dfJ0WpWoysi4KAWmHU/JbtV4I0rmj1YmjiRsygi5ZRUFsH JRxIJiJCZL5PFgSVy0fa9hEEnhgXhfyHHIMUei/sOw40Pi9IGwSnr1ammksLYPDzZaHF rvtfBe1TfAtN7ldnefY5vmRsyDsxVO8OkT9WYcJDHGbhcjRamXbkiCB/xCzuN48gt5b9 7ZKA== X-Gm-Message-State: AHPjjUil39V6UNOS+Jw4EEiz0J5I95bLBavZW2sA+TwksaijgDbVwmlY Npfes2phPuiVpBAaxRUv3A== X-Google-Smtp-Source: ADKCNb5XeHHlbUr2G6ds/ahTIZVB+HVxXS8ilJFo8RSPHRJ0tjgN8rhvnTisPyKvMDxN6nQFSj4giA== X-Received: by 10.99.55.25 with SMTP id e25mr31537120pga.383.1505730766344; Mon, 18 Sep 2017 03:32:46 -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 b7sm12937845pge.79.2017.09.18.03.32.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Sep 2017 03:32:45 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 18 Sep 2017 16:01:53 +0530 Message-Id: <1505730731-10947-10-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505730731-10947-1-git-send-email-bhupinder.thakur@linaro.org> References: <1505730731-10947-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 09/27 v9] 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); }