From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: Re: Re: [PATCH, v4]: xl: randomly generate UUID's Date: Wed, 1 Sep 2010 14:22:39 +0200 Message-ID: <201009011422.41015.Christoph.Egger@amd.com> References: <1282930440.3731.137.camel@qabil.uk.xensource.com> <201008301451.25381.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <201008301451.25381.Christoph.Egger@amd.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Jackson , Owen Smith , Gianni Tedesco , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Monday 30 August 2010 14:51:23 Christoph Egger wrote: > On Friday 27 August 2010 19:34:00 Gianni Tedesco wrote: > > Changes since v3: > > - Fix LIBXL_UUID_BYTES on NetBSD. Note that the code assumes > > uint8_t[16] to always be interchangeable with libxl_uuid_t. uuid_t is a struct in NetBSD. It is defined as: #define __UUID_NODE_LEN 6 /* Length of a node address (an IEEE 802 address). */ struct uuid { uint32_t time_low; uint16_t time_mid; uint16_t time_hi_and_version; uint8_t clock_seq_hi_and_reserved; uint8_t clock_seq_low; uint8_t node[_UUID_NODE_LEN]; }; typedef struct uuid uuid_t; > > - Return error messages when uuid_parse fails, spotted by Owen Smith > > - Implement "uuid" parameter in xl and exit with an error if parse > > fails > > Changes since v2: > > - Re-based to remove orthogonal concern of UUID string formatting fixed > > in 22001:0b6f82eaaea9 "xl: make libxl_uuid2string internal to > > libxenlight" - Incorporated Christoph Egger's suggestions > > I will test this. gcc produces several warnings "return from incompatible pointer type" and errors "cannot convert to a pointer type". libxl_uuid.h:147: warning: return from incompatible pointer type xl_cmdimpl.c:419: error: cannot convert to a pointer type The assumption that uuid_t and uint8_t[16] being interchangeable is wrong. According to the manpage (http://netbsd.gw.com/cgi-bin/man-cgi?uuid++NetBSD-current), what you probably want is uuid_enc_* and uuid_dec_* ? The question is do want the binary representation in little endian or big endian format? Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632