WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH, v4]: xl: randomly generate UUID's

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Re: [PATCH, v4]: xl: randomly generate UUID's
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Wed, 1 Sep 2010 14:22:39 +0200
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Owen Smith <owen.smith@xxxxxxxxxx>, Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 01 Sep 2010 05:58:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201008301451.25381.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1282930440.3731.137.camel@xxxxxxxxxxxxxxxxxxxxxx> <201008301451.25381.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.10
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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>