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

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.