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

[Xen-changelog] [xen-unstable] tools/ocaml: Properly adjust fields in ocaml structure to match the C layer.



# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1279045693 -3600
# Node ID c71d28c5c6fbf6d6704000ae2ec5962cad012e1f
# Parent  bdfb75cd6602757711a06f060883372e99f65531
tools/ocaml: Properly adjust fields in ocaml structure to match the C layer.

Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/ocaml/libs/xl/xl.ml      |   12 ++++++------
 tools/ocaml/libs/xl/xl.mli     |   12 ++++++------
 tools/ocaml/libs/xl/xl_stubs.c |   24 ++++++++++++------------
 3 files changed, 24 insertions(+), 24 deletions(-)

diff -r bdfb75cd6602 -r c71d28c5c6fb tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Tue Jul 13 19:27:50 2010 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Tue Jul 13 19:28:13 2010 +0100
@@ -45,15 +45,15 @@ type build_hvm_info =
        nx : bool;
        viridian : bool;
        timeoffset : string;
-}
-
-type build_spec = BuildHVM of build_hvm_info | BuildPV of build_pv_info
-
-type build_info =
-{
        timer_mode : int;
        hpet : int;
        vpt_align : int;
+}
+
+type build_spec = BuildHVM of build_hvm_info | BuildPV of build_pv_info
+
+type build_info =
+{
        max_vcpus : int;
        cur_vcpus : int;
        max_memkb : int64;
diff -r bdfb75cd6602 -r c71d28c5c6fb tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli        Tue Jul 13 19:27:50 2010 +0100
+++ b/tools/ocaml/libs/xl/xl.mli        Tue Jul 13 19:28:13 2010 +0100
@@ -45,15 +45,15 @@ type build_hvm_info =
        nx : bool;
        viridian : bool;
        timeoffset : string;
-}
-
-type build_spec = BuildHVM of build_hvm_info | BuildPV of build_pv_info
-
-type build_info =
-{
        timer_mode : int;
        hpet : int;
        vpt_align : int;
+}
+
+type build_spec = BuildHVM of build_hvm_info | BuildPV of build_pv_info
+
+type build_info =
+{
        max_vcpus : int;
        cur_vcpus : int;
        max_memkb : int64;
diff -r bdfb75cd6602 -r c71d28c5c6fb tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c    Tue Jul 13 19:27:50 2010 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c    Tue Jul 13 19:28:13 2010 +0100
@@ -114,15 +114,15 @@ static int domain_build_info_val (libxl_
        CAMLparam1(v);
        CAMLlocal1(infopriv);
 
-       c_val->max_vcpus = Int_val(Field(v, 3));
-       c_val->cur_vcpus = Int_val(Field(v, 4));
-       c_val->max_memkb = Int64_val(Field(v, 5));
-       c_val->target_memkb = Int64_val(Field(v, 6));
-       c_val->video_memkb = Int64_val(Field(v, 7));
-       c_val->shadow_memkb = Int64_val(Field(v, 8));
-       c_val->kernel = String_val(Field(v, 9));
-       c_val->hvm = Tag_val(Field(v, 10)) == 0;
-       infopriv = Field(Field(v, 10), 0);
+       c_val->max_vcpus = Int_val(Field(v, 0));
+       c_val->cur_vcpus = Int_val(Field(v, 1));
+       c_val->max_memkb = Int64_val(Field(v, 2));
+       c_val->target_memkb = Int64_val(Field(v, 3));
+       c_val->video_memkb = Int64_val(Field(v, 4));
+       c_val->shadow_memkb = Int64_val(Field(v, 5));
+       c_val->kernel = String_val(Field(v, 6));
+       c_val->hvm = Tag_val(Field(v, 7)) == 0;
+       infopriv = Field(Field(v, 7), 0);
        if (c_val->hvm) {
                c_val->u.hvm.pae = Bool_val(Field(infopriv, 0));
                c_val->u.hvm.apic = Bool_val(Field(infopriv, 1));
@@ -130,9 +130,9 @@ static int domain_build_info_val (libxl_
                c_val->u.hvm.nx = Bool_val(Field(infopriv, 3));
                c_val->u.hvm.viridian = Bool_val(Field(infopriv, 4));
                c_val->u.hvm.timeoffset = String_val(Field(infopriv, 5));
-               c_val->u.hvm.timer_mode = Int_val(Field(v, 0));
-               c_val->u.hvm.hpet = Int_val(Field(v, 1));
-               c_val->u.hvm.vpt_align = Int_val(Field(v, 2));
+               c_val->u.hvm.timer_mode = Int_val(Field(infopriv, 6));
+               c_val->u.hvm.hpet = Int_val(Field(infopriv, 7));
+               c_val->u.hvm.vpt_align = Int_val(Field(infopriv, 8));
        } else {
                c_val->u.pv.slack_memkb = Int64_val(Field(infopriv, 0));
                c_val->u.pv.cmdline = String_val(Field(infopriv, 1));

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


 


Rackspace

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