xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Julien Grall <julien.grall@linaro.org>, xen-devel@lists.xenproject.org
Cc: stefano.stabellini@citrix.com, tim@xen.org, ian.campbell@citrix.com
Subject: Re: [RFC 08/14] xen/xsm: flask: Rename variable "bool" in "b"
Date: Thu, 13 Mar 2014 10:27:04 -0400	[thread overview]
Message-ID: <5321C038.7050808@tycho.nsa.gov> (raw)
In-Reply-To: <1394640969-25583-9-git-send-email-julien.grall@linaro.org>

On 03/12/2014 12:16 PM, Julien Grall wrote:
> 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 <julien.grall@linaro.org>
> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

> ---
>   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;
>


-- 
Daniel De Graaf
National Security Agency

  parent reply	other threads:[~2014-03-13 14:27 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 16:15 [RFC 00/14] xen/arm: Add support for XSM Julien Grall
2014-03-12 16:15 ` [RFC 01/14] xen/arm: kernel: Don't harcode flash address Julien Grall
2014-03-14 17:10   ` Ian Campbell
2014-03-14 17:44     ` Julien Grall
2014-03-12 16:15 ` [RFC 02/14] xen/arm: Remove the parameter "attrindx" in copy_paddr Julien Grall
2014-03-14 17:14   ` Ian Campbell
2014-03-14 18:02     ` Julien Grall
2014-03-17 10:13       ` Ian Campbell
2014-03-17 11:53         ` Julien Grall
2014-03-17 12:02           ` Ian Campbell
2014-03-12 16:15 ` [RFC 03/14] xen/arm: Correctly define size_t Julien Grall
2014-03-14 17:18   ` Ian Campbell
2014-03-12 16:15 ` [RFC 04/14] xen/arm: next_module: Skip module if the size is 0 Julien Grall
2014-03-14 17:19   ` Ian Campbell
2014-03-12 16:16 ` [RFC 05/14] xen/xsm: xsm functions for PCI passthrough is not x86 specific Julien Grall
2014-03-13 14:25   ` Daniel De Graaf
2014-03-14 17:20     ` Ian Campbell
2014-03-12 16:16 ` [RFC 06/14] xen/xsm: xsm_do_mca is " Julien Grall
2014-03-13 14:26   ` Daniel De Graaf
2014-03-14 17:21     ` Ian Campbell
2014-03-12 16:16 ` [RFC 07/14] xen/xsm: flask: Fix compilation when CONFIG_COMPAT=y Julien Grall
2014-03-13 14:26   ` Daniel De Graaf
2014-03-14 17:23     ` Ian Campbell
2014-03-14 18:08       ` Julien Grall
2014-03-17  7:22       ` Jan Beulich
2014-03-17 10:15         ` Ian Campbell
2014-03-17 11:57         ` Julien Grall
2014-03-12 16:16 ` [RFC 08/14] xen/xsm: flask: Rename variable "bool" in "b" Julien Grall
2014-03-12 16:26   ` Andrew Cooper
2014-03-13 13:17     ` Julien Grall
2014-03-13 13:57       ` Jan Beulich
2014-03-13 14:27   ` Daniel De Graaf [this message]
2014-03-14 17:24     ` Ian Campbell
2014-03-12 16:16 ` [RFC 09/14] xen/xsm: flask: MSI is PCI specific Julien Grall
2014-03-13 14:34   ` Daniel De Graaf
2014-03-13 14:40     ` Julien Grall
2014-03-14 17:25       ` Ian Campbell
2014-03-14 18:15         ` Julien Grall
2014-03-17 10:13           ` Ian Campbell
2014-03-17 12:05             ` Julien Grall
2014-03-12 16:16 ` [RFC 10/14] xen/xsm: flask: flask_copying_string is taking a XEN_GUEST_HANDLE as first param Julien Grall
2014-03-13 14:34   ` Daniel De Graaf
2014-03-14 17:26     ` Ian Campbell
2014-03-12 16:16 ` [RFC 11/14] xen/xsm: flask: Add missing header in hooks.c Julien Grall
2014-03-13 14:34   ` Daniel De Graaf
2014-03-14 17:26     ` Ian Campbell
2014-03-12 16:16 ` [RFC 12/14] xen/xsm: Don't use multiboot by default to initialize XSM Julien Grall
2014-03-12 16:52   ` Jan Beulich
2014-03-13 14:36   ` Daniel De Graaf
2014-03-14 17:27     ` Ian Campbell
2014-03-12 16:16 ` [RFC 13/14] xen/xsm: Add support for device tree Julien Grall
2014-03-13 14:47   ` Daniel De Graaf
2014-03-14 17:34   ` Ian Campbell
2014-03-14 18:24     ` Julien Grall
2014-03-17 10:15       ` Ian Campbell
2014-03-12 16:16 ` [RFC 14/14] xen/arm: Add support for XSM Julien Grall
2014-03-14 17:34   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5321C038.7050808@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).