From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 2/2] libxl: fix UUID usage on FreeBSD Date: Fri, 15 Jan 2016 10:26:42 +0000 Message-ID: <1452853602.32341.61.camel@citrix.com> References: <1452604467-65746-1-git-send-email-roger.pau@citrix.com> <1452604467-65746-3-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aK1b2-0004iF-Ho for xen-devel@lists.xenproject.org; Fri, 15 Jan 2016 10:27:08 +0000 In-Reply-To: <1452604467-65746-3-git-send-email-roger.pau@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org 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*.