From patchwork Mon Mar 17 14:05:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 26366 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 81FB0202FA for ; Mon, 17 Mar 2014 14:07:29 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id cz12sf13948707veb.10 for ; Mon, 17 Mar 2014 07:07:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=VgKw25TFT7/64BPvxB23XNscWvVZR3CTkSQdfcqM578=; b=m3exs2a2FOfND4F6PXMP+LLXf9PXc2n2sE3u/SQi6XLK+jJJjnm4zpnKCwFE1zB/VK DHLz/aJ5a4Xxm1XgvKHa6Vt/KK2XlqQbIRepKSCOg7wtUz34IHGvHJfnU/DYi/2lk2sg HhS6TZY1BHDkXhXINoT5BmtMiv6DWFFhMIrwUdIsfFCwo8Nl86ygLrWgNOStkO5GOT05 y+BN/RD8rjxqF1C3o6LQI9AIjfraLcCysqbSx8ECfQ+fnE692WwHvBh7MndJ8QL4LTbv AVbsaiG3WK6egr2DbB84agj/1my8fwMyNszFWVVMJU1RdVq/A0qFhZdcf6Nd29TXNR+m IZSg== X-Gm-Message-State: ALoCoQmPtB0ZeZ7Ho7qan6hrMseic3HQgoeHgZcwUA3mAn6bMCwD2q6I67fRr5AEfpz1ThC/2YMH X-Received: by 10.58.248.170 with SMTP id yn10mr8869534vec.17.1395065249288; Mon, 17 Mar 2014 07:07:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.196 with SMTP id 62ls950917qgt.76.gmail; Mon, 17 Mar 2014 07:07:29 -0700 (PDT) X-Received: by 10.58.37.232 with SMTP id b8mr1373512vek.27.1395065249152; Mon, 17 Mar 2014 07:07:29 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id kj3si1769838vdb.141.2014.03.17.07.07.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 07:07:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so5746182veb.34 for ; Mon, 17 Mar 2014 07:07:29 -0700 (PDT) X-Received: by 10.220.131.210 with SMTP id y18mr20331457vcs.12.1395065249063; Mon, 17 Mar 2014 07:07:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp130031vck; Mon, 17 Mar 2014 07:07:28 -0700 (PDT) X-Received: by 10.229.58.200 with SMTP id i8mr28554589qch.4.1395065248504; Mon, 17 Mar 2014 07:07:28 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id v4si8603871qap.151.2014.03.17.07.07.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 07:07:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPYBS-0002Ix-UU; Mon, 17 Mar 2014 14:06:30 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPYBR-0002Fq-76 for xen-devel@lists.xenproject.org; Mon, 17 Mar 2014 14:06:29 +0000 Received: from [85.158.137.68:26473] by server-1.bemta-3.messagelabs.com id 20/9E-11134-46107235; Mon, 17 Mar 2014 14:06:28 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-4.tower-31.messagelabs.com!1395065187!1113786!1 X-Originating-IP: [74.125.83.54] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21216 invoked from network); 17 Mar 2014 14:06:27 -0000 Received: from mail-ee0-f54.google.com (HELO mail-ee0-f54.google.com) (74.125.83.54) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 17 Mar 2014 14:06:27 -0000 Received: by mail-ee0-f54.google.com with SMTP id d49so4143914eek.41 for ; Mon, 17 Mar 2014 07:06:27 -0700 (PDT) X-Received: by 10.14.115.1 with SMTP id d1mr24108140eeh.30.1395065187212; Mon, 17 Mar 2014 07:06:27 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id x3sm39716538eep.17.2014.03.17.07.06.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Mar 2014 07:06:26 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 17 Mar 2014 14:05:58 +0000 Message-Id: <1395065165-15915-9-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395065165-15915-1-git-send-email-julien.grall@linaro.org> References: <1395065165-15915-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH v2 08/15] xen/xsm: flask: Rename variable "bool" in "b" X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: On ARM, the compilation is failing with the following error: In file included from flask_op.c:21:0: ./include/conditional.h:24:43: error: two or more data types in declaration specifiers ./include/conditional.h:25:42: error: two or more data types in declaration specifiers Signed-off-by: Julien Grall Acked-by: Daniel De Graaf Acked-by: Ian Campbell --- xen/xsm/flask/include/conditional.h | 4 ++-- xen/xsm/flask/ss/services.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/xsm/flask/include/conditional.h b/xen/xsm/flask/include/conditional.h index 043cfd8..9055340 100644 --- a/xen/xsm/flask/include/conditional.h +++ b/xen/xsm/flask/include/conditional.h @@ -21,7 +21,7 @@ int security_set_bools(int len, int *values); int security_find_bool(const char *name); -char *security_get_bool_name(unsigned int bool); -int security_get_bool_value(unsigned int bool); +char *security_get_bool_name(unsigned int b); +int security_get_bool_value(unsigned int b); #endif diff --git a/xen/xsm/flask/ss/services.c b/xen/xsm/flask/ss/services.c index aebbec7..59234ff 100644 --- a/xen/xsm/flask/ss/services.c +++ b/xen/xsm/flask/ss/services.c @@ -1958,7 +1958,7 @@ out: return rc; } -int security_get_bool_value(unsigned int bool) +int security_get_bool_value(unsigned int b) { int rc = 0; unsigned int len; @@ -1966,19 +1966,19 @@ int security_get_bool_value(unsigned int bool) POLICY_RDLOCK; len = policydb.p_bools.nprim; - if ( bool >= len ) + if ( b >= len ) { rc = -ENOENT; goto out; } - rc = policydb.bool_val_to_struct[bool]->state; + rc = policydb.bool_val_to_struct[b]->state; out: POLICY_RDUNLOCK; return rc; } -char *security_get_bool_name(unsigned int bool) +char *security_get_bool_name(unsigned int b) { unsigned int len; char *rv = NULL; @@ -1986,16 +1986,16 @@ char *security_get_bool_name(unsigned int bool) POLICY_RDLOCK; len = policydb.p_bools.nprim; - if ( bool >= len ) + if ( b >= len ) { goto out; } - len = strlen(policydb.p_bool_val_to_name[bool]) + 1; + len = strlen(policydb.p_bool_val_to_name[b]) + 1; rv = xmalloc_array(char, len); if ( !rv ) goto out; - memcpy(rv, policydb.p_bool_val_to_name[bool], len); + memcpy(rv, policydb.p_bool_val_to_name[b], len); out: POLICY_RDUNLOCK; return rv;