libxl: replace the usage of uuid_t with a char array
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 8 Apr 2016 14:00:16 +0000 (16:00 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 8 Apr 2016 14:07:17 +0000 (15:07 +0100)
commitf75f726a6ea0245b1e11dd006f8e5c296dfe92dd
treedc77ee20532e98d92b12e95fd0bb74b139901f14
parent281962851f8bd59c6aed2efee222337349857e3a
libxl: replace the usage of uuid_t with a char array

The internals of the uuid_t struct don't match a big endian octet stream on
*BSD systems, which means that it cannot be directly casted to a
uint8_t[16].

In order to solve that change the type to be an unsigned char[16], which
doesn't imply any other change on Linux. On *BSDs change the helpers so that
the uuid is always stored as a big endian byte stream.

NB: tested on FreeBSD and Linux only.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Discussed-with: Ian Jackson <Ian.Jackson@eu.citrix.com>
Discussed-with: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.h
tools/libxl/libxl_osdeps.h
tools/libxl/libxl_uuid.c
tools/libxl/libxl_uuid.h