[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] libxl: fix UUID usage on FreeBSD



El 15/01/16 a les 11.26, Ian Campbell ha escrit:
> On Tue, 2016-01-12 at 14:14 +0100, Roger Pau Monne wrote:
>> libxl makes the assumtion that libxl_uuid == uuid_t,
> 
> ("assumption")
> 
>>  and that uuid_t can be
>> freely used as a byte array. This is not true on FreeBSD (and NetBSD
>> too, not sure about other BSD UUID implementations), where the internals
>> of
>> uuid don't match what libxl expects as a byte array because of endianness
>> issues.
>>
>> Fix this by converting the libxl_uuid type to a struct with an internal
>> uuid_t field and a byte-array. Also introduce a new function that should
>> be
>> used in order to load a byte array into a uuid_t struct.
> 
> Do we really need to keep both the uuid_t and the byte-array representation
> around? It looks to me as if we only really need the byte-array form, which
> might then involve changing various uses of uuid_* internally to just be
> mem*.

Yes, we can remove the uuid_t from libxl_uuid, but this is AFAICT a
structure that belongs to the stable API. My current change keeps the
same layout by turning the union into a struct, but without changing the
fields.

Roger.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.