From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH v3 3/5] libxl: add support for FreeBSD uuid implementation
Date: Thu, 19 Jun 2014 17:42:11 +0100 [thread overview]
Message-ID: <53A312E3.8010502@citrix.com> (raw)
In-Reply-To: <1403195568-19464-4-git-send-email-roger.pau@citrix.com>
On 19/06/14 17:32, Roger Pau Monne wrote:
> Add the FreeBSD specific uuid implementation. Since uuid_t is not
> defined as an array, but as a struct on FreeBSD, use a union with a
> array in order to be able to return the uuid as a bytearray.
>
> Also, added a libxl internal compile time assert macro, that is used
> to assert that the size of uuid_t is the same as the union used in
> libxl.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> ---
> Changes since v2:
> - Unify the FreeBSD and NetBSD uuid implementations as much as
> possible.
> ---
> tools/libxl/libxl_internal.h | 4 ++++
> tools/libxl/libxl_uuid.c | 40 ++++++++++++++++++++++++++++++++--------
> tools/libxl/libxl_uuid.h | 12 +++++++-----
> 3 files changed, 43 insertions(+), 13 deletions(-)
>
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index a0d4f24..0784403 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -3179,6 +3179,10 @@ int libxl__uint64_parse_json(libxl__gc *gc, const libxl__json_object *o,
> void *p);
> int libxl__string_parse_json(libxl__gc *gc, const libxl__json_object *o,
> char **p);
> +/*
> + * Compile time assertion
> + */
> +#define BUILD_BUG_ON(p) ((void)sizeof(char[1 - 2 * !!(p)]))
>
Please prefer _Static_assert if available.
c/s d5a3bc1a214 is the way I did this for libxc.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-06-19 16:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 16:32 [PATCH v3 0/5] tools: add support for FreeBSD Roger Pau Monne
2014-06-19 16:32 ` [PATCH v3 1/5] configure: set blktap2 availability on configure Roger Pau Monne
2014-06-19 16:41 ` David Vrabel
2014-06-19 16:46 ` Roger Pau Monné
2014-06-19 16:47 ` David Vrabel
2014-06-19 16:32 ` [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2} Roger Pau Monne
2014-06-19 17:35 ` Wei Liu
2014-06-19 17:46 ` Roger Pau Monné
2014-06-27 11:44 ` Ian Campbell
2014-06-19 16:32 ` [PATCH v3 3/5] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
2014-06-19 16:42 ` Andrew Cooper [this message]
2014-06-19 16:32 ` [PATCH v3 4/5] libxl: remove the gate that only allows block or regular backing images Roger Pau Monne
2014-06-19 16:32 ` [PATCH v3 5/5] libxc: fix printf formatting error surfaced by 66f8c6 Roger Pau Monne
2014-06-27 13:38 ` [PATCH v3 0/5] tools: add support for FreeBSD 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=53A312E3.8010502@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=roger.pau@citrix.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.