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

Re: [Xen-devel] [PATCH RFC 17/23] libxl: add support for FreeBSD uuid implementation



On 17/04/14 19:11, Ian Jackson wrote:
> Roger Pau Monne writes ("[PATCH RFC 17/23] libxl: add support for FreeBSD 
> uuid implementation"):
>> 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.
> 
> I don't have a FreeBSD machine here to hand, but if it's a struct full
> of >1-byte objects, aren't there endian problems with this approach ?

I'm frankly not familiar at all with uuid or how it's supposed to work,
but from what I saw, the NetBSD and FreeBSD implementations of uuid are
very similar (most of FreeBSD code seems to be picked from NetBSD).

I'm not sure what endian problems can come out of it, NetBSD uses the
same approach. The only difference is that NetBSD directly defines the
uuid field as an array, but on FreeBSD I've preferred to use a union of
the native type with an array (so native functions get called by passing
the right type, which is uuid_t), while libxl can still make use of the
byte array.

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®.