From patchwork Wed Sep 27 06:13:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 114336 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4665417qgf; Tue, 26 Sep 2017 23:17:03 -0700 (PDT) X-Received: by 10.107.63.67 with SMTP id m64mr437491ioa.104.1506493023636; Tue, 26 Sep 2017 23:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506493023; cv=none; d=google.com; s=arc-20160816; b=keXvLMnXqajC8mYPDLw6biZDSVa52NiB84j7Ljes40Tq5245/56xYjmXOWvOueBnuj wUw/Mc53DTa+w+EGNGE2aX1Nt8IyyhdGe3KJBwza/eA+z6bSQRsKjW9SU0dfAuTVPjXq sWR3BX+0sCo5Wdcwhe2IKuop2treVoirozczo+Nl1uUdSNSUpMO0zUOKru1AfW0sKYRi i0+S0AbajjwemiqnJJxMlRRAkRnYYyPzb8VXHbyBZcHp0rAYay8Y0zBKp/tu/ieOFUZt QOrj7v4+VJNB3PZRsQ2a8Cz4C8cHFBHaJBtdYRlsROuiR4iNsnCnCeUhZgAGPI6Al/yl So1w== 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=VMPudbIlpLyQPVWUPDLcDe5muhCTygHv48zTY1pezm7XF2n8HNCnABY4lmxk9EaR0A zZpyMElpKGHmEPqMrKr3CnX0dVTMFE2kTZehSh6Rn+7c7yO+sW3Lsa5Ma0HBHJTlAjya WrobXf5j2OmvkBcANpUSMa+L7yv4qF52x6RW/VWL3rQAXXld+a2HCPLV8nSQW8NCAzYb DG+Bo9pcNa5IFWciaqBklGvSPBet8QjOQxW3H/pmRn0NBuco492Vbv1DH5sp+ayRCx2H vevxkSpfBUMtlPbRmwWJpoTNV93CIJsqNnJUobNif1aTKK7bkesEkRCZeYB4lXZvZgip uZLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aeGlw/iW; 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 t15si3548404iti.72.2017.09.26.23.17.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2017 23:17: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=aeGlw/iW; 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 1dx5bY-0002ZV-J3; Wed, 27 Sep 2017 06:13:56 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx5bX-0002Xc-7W for xen-devel@lists.xenproject.org; Wed, 27 Sep 2017 06:13:55 +0000 Received: from [85.158.143.35] by server-8.bemta-6.messagelabs.com id A2/03-17770-2A14BC95; Wed, 27 Sep 2017 06:13:54 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsXiVRuspbvA8XS kQd8GA4vvWyYzOTB6HP5whSWAMYo1My8pvyKBNePC6172gr/SFRtu/mdtYNwv3sXIxSEkMI1R 4tihlawgDovAPGaJlVOmsnUxcnJICPSzSvy6AlTFAWTnSUzcYg4RTpNY2j6HBcKukPjd/ZgJx BYS0JI4emo2K8TQFUwS807sZQLpZRMwkZjVIQFSIyKgJHFv1WQmkBpmgfmMEk2TesF2CQskSj Rvec8MYrMIqEosf9cG1ssr4CMx8ZwpxC45iZvnOsFKOIHCp/tvs0Hs9Za4tLKfdQKj4AJGhlW MGsWpRWWpRbrGRnpJRZnpGSW5iZk5uoYGZnq5qcXFiempOYlJxXrJ+bmbGIHhxgAEOxhPrws8 xCjJwaQkylvz/1SkEF9SfkplRmJxRnxRaU5q8SFGGQ4OJQneOIfTkUKCRanpqRVpmTnAwIdJS 3DwKInwRoGkeYsLEnOLM9MhUqcYLTm+9N74w8Sxb88tINlx8+4fJiGWvPy8VClx3iqQBgGQho zSPLhxsOi8xCgrJczLCHSgEE9BalFuZgmq/CtGcQ5GJWHeZJApPJl5JXBbXwEdxAR0UO/UEyA HlSQipKQaGJfYXEsImPeRiVfww6ZNaYJdmx2iUkryQ7cZ9K46+VnwHOtNdr53LrtW/N1UMe8x 44p3ylovWUIudnVy3xBPSZnXuty/JCX5gNjrdeXmKTJfsr6tSWiVe/D6aTD3wiM1+nMuXBN9O Tmtzkzp6tmDATUzYh7G/NBcZhOUcGrNp1szlkY85BNenKvEUpyRaKjFXFScCABVwNuMyQIAAA == X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-12.tower-21.messagelabs.com!1506492831!84769283!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.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 44945 invoked from network); 27 Sep 2017 06:13:52 -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; 27 Sep 2017 06:13:52 -0000 Received: by mail-pg0-f42.google.com with SMTP id 7so7210543pgd.13 for ; Tue, 26 Sep 2017 23:13:52 -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=aeGlw/iWpU91r/VUxq+VOv779qlFg770iQFjOgfJPudEG1PjjJvp0ipMWZfSi9vkq/ ooo+VESCXYf8r/dwvbPUxpSU2sKjViVapZXGFcFnyazkVtQE1LnEyo4jAAiVhX2Ar8Y7 Xky3xeISnj4uwfDpGEjb/vSuEk2ZkbWlJJvsQ= 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=Nr9224tEnnFx+OkoGTPl2FhVWkJN6ljLYcetg2WHlVRo+q1BWNhHyKH/6p9X3Dlh+f g4g1Sae+52avmPE4GjZ3yBlzuRBdQX0KG2qAqSaRxnjQDd3ghTMBJUC3VxtrF7cbOjvi smgHipjanwSqSPCaXF1mJA3O+9ObI4BrX84uNNl07FOJWQB0oj3cc76UOLzQqPv6cWGP hnoYOx2NQ183GiqmXO71W7UT1eufiiizacs7Gm87FvRzTBaG3N733VaOo8vEkhQZjnQl Nnsq151cpRRVKkDPXVXnPrHrdpI7B109BREExuTVB+4tXU31IZ1vnocEGDNDt5NwWPWH zhtQ== X-Gm-Message-State: AHPjjUj0StPRx8U0MXHw9KPg7JX9trJTJUK6mSjiB+xv73XssG4DU8Db 7pBOwdBwEHQPMe6hFiiPV3PTU0xZcW8= X-Google-Smtp-Source: AOwi7QDvYuV5FnIUrCxpwVxcZQ6fnkLWy0dTGNywWMrAr0pBeC9m96c0dbaBQ1lb8vNjDG6/9J3DCA== X-Received: by 10.84.253.23 with SMTP id z23mr329339pll.210.1506492831066; Tue, 26 Sep 2017 23:13:51 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com (h3.248.139.40.ip.windstream.net. [40.139.248.3]) by smtp.gmail.com with ESMTPSA id s187sm18013485pgb.82.2017.09.26.23.13.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Sep 2017 23:13:50 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Wed, 27 Sep 2017 11:43:18 +0530 Message-Id: <1506492816-25954-10-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506492816-25954-1-git-send-email-bhupinder.thakur@linaro.org> References: <1506492816-25954-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 09/27 v11] 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); }