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

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

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: [Xen-devel] Re: [PATCH,v6]: xl: randomly generate UUID's
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Thu, 2 Sep 2010 15:14:25 +0100
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 02 Sep 2010 07:19:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201009021029.39240.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: <1283359298.20276.52.camel@xxxxxxxxxxxxxxxxxxxxxx> <201009021029.39240.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2010-09-02 at 09:29 +0100, Christoph Egger wrote:
> This patch compiles libxl at least.
> Compiling fails in tools/ocaml with
> xl_stubs.c: In function 'domain_create_info_val':
> xl_stubs.c:143: error: subscripted value is neither array nor pointer
> 
> Can you come up with a small test driver for the uuid functions in
> libxl_uuid.h, please ?

I did and they work fine. Jt's just that I'm not building ocaml bits.
Problem is simply that ocaml xl_stubs.c is assuming uuid is a uint8_t *
still when it isn't:

diff -r cfc17c8299cc tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c    Wed Sep 01 17:41:53 2010 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c    Thu Sep 02 15:16:37 2010 +0100
@@ -131,6 +131,7 @@ static int domain_create_info_val (caml_
 {
        CAMLparam1(v);
        CAMLlocal1(a);
+       libxl_uuid *uuid = libxl_uuid_bytearray(c_val);
        int i;
 
        c_val->hvm = Bool_val(Field(v, 0));
@@ -140,7 +141,7 @@ static int domain_create_info_val (caml_
        c_val->name = dup_String_val(gc, Field(v, 4));
        a = Field(v, 5);
        for (i = 0; i < 16; i++)
-               c_val->uuid[i] = Int_val(Field(a, i));
+               uuid[i] = Int_val(Field(a, i));
        string_string_tuple_array_val(gc, &(c_val->xsdata), Field(v, 6));
        string_string_tuple_array_val(gc, &(c_val->platformdata), Field(v, 7));
 



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

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