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>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
This commit is contained in:
Ian Campbell committed 2011-04-20 17:13:07 +01:00
1 parent 2510e0239b
commit a7fbdcf223
3 files changed
-167

No files matched your search

-55
View File
@@ -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 =
{
-55
View File
@@ -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 =
{
-57
View File
@@ -128,63 +128,6 @@ static int string_string_tuple_array_val (caml_gc *gc, char ***c_val, value v)
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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.