Mailing List Archive

[PATCH 29 of 32] tools: ocaml: remove create_info and build_info data types from xl bindings
# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1303134473 -3600
# Node ID a19c1ce6f65f91dc807d845be9fbda18173dc74d
# Parent 009009ca09d851d17fddf4a5a559112f574ace05
tools: ocaml: remove create_info and build_info data types from xl bindings

There are currently no stub functions which use these datatypes. The
existing definitions are out of date wrt the C API (and the conversion
routines are commented out anyway) and are complex from the IDL point
of view (and so will be skipped in the first round of
autogeneration). Remove them to keep things simple for now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 009009ca09d8 -r a19c1ce6f65f tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Mon Apr 18 14:47:30 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Mon Apr 18 14:47:53 2011 +0100
@@ -37,22 +37,6 @@ type button =
| Button_Power
| Button_Sleep

-module Domain_create_info = struct
- type t =
- {
- hvm : bool;
- hap : bool;
- oos : bool;
- ssidref : int32;
- name : string;
- uuid : int array;
- xsdata : (string * string) list;
- platformdata : (string * string) list;
- poolid : int32;
- poolname : string;
- }
-end
-
module Device_vfb = struct
type t =
{
@@ -176,45 +160,6 @@ module Sched_credit = struct
external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"
end

-module Domain_build_info = struct
- module Hvm = struct
- type t =
- {
- pae : bool;
- apic : bool;
- acpi : bool;
- nx : bool;
- viridian : bool;
- timeoffset : string;
- timer_mode : int;
- hpet : int;
- vpt_align : int;
- }
- end
-
- module Pv = struct
- type t =
- {
- slack_memkb : int64;
- cmdline : string;
- ramdisk : string;
- features : string;
- }
- end
-
- type t =
- {
- max_vcpus : int;
- cur_vcpus : int;
- max_memkb : int64;
- target_memkb : int64;
- video_memkb : int64;
- shadow_memkb : int64;
- kernel : string;
- u : [ `HVM of Hvm.t | `PV of Pv.t ];
- }
-end
-
module Topologyinfo = struct
type t =
{
diff -r 009009ca09d8 -r a19c1ce6f65f tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli Mon Apr 18 14:47:30 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.mli Mon Apr 18 14:47:53 2011 +0100
@@ -37,22 +37,6 @@ type button =
| Button_Power
| Button_Sleep

-module Domain_create_info : sig
- type t =
- {
- hvm : bool;
- hap : bool;
- oos : bool;
- ssidref : int32;
- name : string;
- uuid : int array;
- xsdata : (string * string) list;
- platformdata : (string * string) list;
- poolid : int32;
- poolname : string;
- }
-end
-
module Device_vfb : sig
type t =
{
@@ -177,45 +161,6 @@ module Sched_credit : sig
external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"
end

-module Domain_build_info : sig
- module Hvm : sig
- type t =
- {
- pae : bool;
- apic : bool;
- acpi : bool;
- nx : bool;
- viridian : bool;
- timeoffset : string;
- timer_mode : int;
- hpet : int;
- vpt_align : int;
- }
- end
-
- module Pv : sig
- type t =
- {
- slack_memkb : int64;
- cmdline : string;
- ramdisk : string;
- features : string;
- }
- end
-
- type t =
- {
- max_vcpus : int;
- cur_vcpus : int;
- max_memkb : int64;
- target_memkb : int64;
- video_memkb : int64;
- shadow_memkb : int64;
- kernel : string;
- u : [ `HVM of Hvm.t | `PV of Pv.t ];
- }
-end
-
module Topologyinfo : sig
type t =
{
diff -r 009009ca09d8 -r a19c1ce6f65f tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c Mon Apr 18 14:47:30 2011 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c Mon Apr 18 14:47:53 2011 +0100
@@ -128,63 +128,6 @@ static int string_string_tuple_array_val
CAMLreturn(0);
}

-static int domain_create_info_val (caml_gc *gc, libxl_domain_create_info *c_val, value v)
-{
- CAMLparam1(v);
- CAMLlocal1(a);
- uint8_t *uuid = libxl_uuid_bytearray(&c_val->uuid);
- int i;
-
- c_val->hvm = Bool_val(Field(v, 0));
- c_val->hap = Bool_val(Field(v, 1));
- c_val->oos = Bool_val(Field(v, 2));
- c_val->ssidref = Int32_val(Field(v, 3));
- c_val->name = dup_String_val(gc, Field(v, 4));
- a = Field(v, 5);
- for (i = 0; i < 16; 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));
-
- c_val->poolid = Int32_val(Field(v, 8));
- c_val->poolname = dup_String_val(gc, Field(v, 9));
-
- CAMLreturn(0);
-}
-
-static int domain_build_info_val (caml_gc *gc, libxl_domain_build_info *c_val, value v)
-{
- CAMLparam1(v);
- CAMLlocal1(infopriv);
-
- 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.path = dup_String_val(gc, Field(v, 6));
- c_val->is_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));
- c_val->u.hvm.acpi = Bool_val(Field(infopriv, 2));
- 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 = dup_String_val(gc, Field(infopriv, 5));
- 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 = dup_String_val(gc, Field(infopriv, 1));
- c_val->u.pv.ramdisk.path = dup_String_val(gc, Field(infopriv, 2));
- c_val->u.pv.features = dup_String_val(gc, Field(infopriv, 3));
- }
-
- CAMLreturn(0);
-}
#endif

static int device_disk_val(caml_gc *gc, libxl_device_disk *c_val, value v)

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
[PATCH 29 of 32] tools: ocaml: remove create_info and build_info data types from xl bindings [ In reply to ]
# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1303315987 -3600
# Node ID 9586790030d8221db24e78f5ca9f0b1a10a480d2
# Parent 9efbf0a2ef1876ade982062e47af53d59abba93b
tools: ocaml: remove create_info and build_info data types from xl bindings

There are currently no stub functions which use these datatypes. The
existing definitions are out of date wrt the C API (and the conversion
routines are commented out anyway) and are complex from the IDL point
of view (and so will be skipped in the first round of
autogeneration). Remove them to keep things simple for now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 9efbf0a2ef18 -r 9586790030d8 tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Wed Apr 20 17:13:07 2011 +0100
@@ -37,22 +37,6 @@ type button =
| Button_Power
| Button_Sleep

-module Domain_create_info = struct
- type t =
- {
- hvm : bool;
- hap : bool;
- oos : bool;
- ssidref : int32;
- name : string;
- uuid : int array;
- xsdata : (string * string) list;
- platformdata : (string * string) list;
- poolid : int32;
- poolname : string;
- }
-end
-
module Device_vfb = struct
type t =
{
@@ -176,45 +160,6 @@ module Sched_credit = struct
external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"
end

-module Domain_build_info = struct
- module Hvm = struct
- type t =
- {
- pae : bool;
- apic : bool;
- acpi : bool;
- nx : bool;
- viridian : bool;
- timeoffset : string;
- timer_mode : int;
- hpet : int;
- vpt_align : int;
- }
- end
-
- module Pv = struct
- type t =
- {
- slack_memkb : int64;
- cmdline : string;
- ramdisk : string;
- features : string;
- }
- end
-
- type t =
- {
- max_vcpus : int;
- cur_vcpus : int;
- max_memkb : int64;
- target_memkb : int64;
- video_memkb : int64;
- shadow_memkb : int64;
- kernel : string;
- u : [ `HVM of Hvm.t | `PV of Pv.t ];
- }
-end
-
module Topologyinfo = struct
type t =
{
diff -r 9efbf0a2ef18 -r 9586790030d8 tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.mli Wed Apr 20 17:13:07 2011 +0100
@@ -37,22 +37,6 @@ type button =
| Button_Power
| Button_Sleep

-module Domain_create_info : sig
- type t =
- {
- hvm : bool;
- hap : bool;
- oos : bool;
- ssidref : int32;
- name : string;
- uuid : int array;
- xsdata : (string * string) list;
- platformdata : (string * string) list;
- poolid : int32;
- poolname : string;
- }
-end
-
module Device_vfb : sig
type t =
{
@@ -177,45 +161,6 @@ module Sched_credit : sig
external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"
end

-module Domain_build_info : sig
- module Hvm : sig
- type t =
- {
- pae : bool;
- apic : bool;
- acpi : bool;
- nx : bool;
- viridian : bool;
- timeoffset : string;
- timer_mode : int;
- hpet : int;
- vpt_align : int;
- }
- end
-
- module Pv : sig
- type t =
- {
- slack_memkb : int64;
- cmdline : string;
- ramdisk : string;
- features : string;
- }
- end
-
- type t =
- {
- max_vcpus : int;
- cur_vcpus : int;
- max_memkb : int64;
- target_memkb : int64;
- video_memkb : int64;
- shadow_memkb : int64;
- kernel : string;
- u : [ `HVM of Hvm.t | `PV of Pv.t ];
- }
-end
-
module Topologyinfo : sig
type t =
{
diff -r 9efbf0a2ef18 -r 9586790030d8 tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c Wed Apr 20 17:13:07 2011 +0100
@@ -128,63 +128,6 @@ static int string_string_tuple_array_val
CAMLreturn(0);
}

-static int domain_create_info_val (caml_gc *gc, libxl_domain_create_info *c_val, value v)
-{
- CAMLparam1(v);
- CAMLlocal1(a);
- uint8_t *uuid = libxl_uuid_bytearray(&c_val->uuid);
- int i;
-
- c_val->hvm = Bool_val(Field(v, 0));
- c_val->hap = Bool_val(Field(v, 1));
- c_val->oos = Bool_val(Field(v, 2));
- c_val->ssidref = Int32_val(Field(v, 3));
- c_val->name = dup_String_val(gc, Field(v, 4));
- a = Field(v, 5);
- for (i = 0; i < 16; 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));
-
- c_val->poolid = Int32_val(Field(v, 8));
- c_val->poolname = dup_String_val(gc, Field(v, 9));
-
- CAMLreturn(0);
-}
-
-static int domain_build_info_val (caml_gc *gc, libxl_domain_build_info *c_val, value v)
-{
- CAMLparam1(v);
- CAMLlocal1(infopriv);
-
- 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.path = dup_String_val(gc, Field(v, 6));
- c_val->is_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));
- c_val->u.hvm.acpi = Bool_val(Field(infopriv, 2));
- 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 = dup_String_val(gc, Field(infopriv, 5));
- 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 = dup_String_val(gc, Field(infopriv, 1));
- c_val->u.pv.ramdisk.path = dup_String_val(gc, Field(infopriv, 2));
- c_val->u.pv.features = dup_String_val(gc, Field(infopriv, 3));
- }
-
- CAMLreturn(0);
-}
#endif

static int device_disk_val(caml_gc *gc, libxl_device_disk *c_val, value v)

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