Reduces the diff of existing vs auto-generated code.
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>
backend_domid : domid;
devid : int;
}
-
external add : t -> domid -> unit = "stub_xl_device_vkb_add"
external clean_shutdown : domid -> unit = "stub_xl_device_vkb_clean_shutdown"
external hard_shutdown : domid -> unit = "stub_xl_device_vkb_hard_shutdown"
devid : int;
consoletype : console_type;
}
-
external add : t -> domid -> unit = "stub_xl_device_console_add"
end
readwrite : bool;
is_cdrom : bool;
}
-
external add : t -> domid -> unit = "stub_xl_device_disk_add"
external del : t -> domid -> unit = "stub_xl_device_disk_del"
end
msitranslate : bool;
power_mgmt : bool;
}
-
external add : t -> domid -> unit = "stub_xl_device_pci_add"
external remove : t -> domid -> unit = "stub_xl_device_pci_remove"
external shutdown : domid -> unit = "stub_xl_device_pci_shutdown"
module Physinfo = struct
type t =
{
- threads_per_core: int;
- cores_per_socket: int;
- max_cpu_id: int;
- nr_cpus: int;
- cpu_khz: int;
- total_pages: int64;
- free_pages: int64;
- scrub_pages: int64;
- nr_nodes: int;
- hwcap: int32 array;
- physcap: int32;
+ threads_per_core : int;
+ cores_per_socket : int;
+ max_cpu_id : int;
+ nr_cpus : int;
+ cpu_khz : int;
+ total_pages : int64;
+ free_pages : int64;
+ scrub_pages : int64;
+ nr_nodes : int;
+ hwcap : int32 array;
+ physcap : int32;
}
external get : unit -> t = "stub_xl_physinfo"
module Sched_credit = struct
type t =
{
- weight: int;
- cap: int;
+ weight : int;
+ cap : int;
}
external domain_get : domid -> t = "stub_xl_sched_credit_domain_get"
external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"
module Topologyinfo = struct
type t =
{
- core: int;
- socket: int;
- node: int;
+ core : int;
+ socket : int;
+ node : int;
}
- external get: unit -> t = "stub_xl_topologyinfo"
+ external get : unit -> t = "stub_xl_topologyinfo"
end
external button_press : domid -> button -> unit = "stub_xl_button_press"
backend_domid : domid;
devid : int;
}
-
external add : t -> domid -> unit = "stub_xl_device_vkb_add"
external clean_shutdown : domid -> unit = "stub_xl_device_vkb_clean_shutdown"
external hard_shutdown : domid -> unit = "stub_xl_device_vkb_hard_shutdown"
readwrite : bool;
is_cdrom : bool;
}
-
external add : t -> domid -> unit = "stub_xl_device_disk_add"
external del : t -> domid -> unit = "stub_xl_device_disk_del"
end
msitranslate : bool;
power_mgmt : bool;
}
-
external add : t -> domid -> unit = "stub_xl_device_pci_add"
external remove : t -> domid -> unit = "stub_xl_device_pci_remove"
external shutdown : domid -> unit = "stub_xl_device_pci_shutdown"
module Physinfo : sig
type t =
{
- threads_per_core: int;
- cores_per_socket: int;
- max_cpu_id: int;
- nr_cpus: int;
- cpu_khz: int;
- total_pages: int64;
- free_pages: int64;
- scrub_pages: int64;
- nr_nodes: int;
- hwcap: int32 array;
- physcap: int32;
+ threads_per_core : int;
+ cores_per_socket : int;
+ max_cpu_id : int;
+ nr_cpus : int;
+ cpu_khz : int;
+ total_pages : int64;
+ free_pages : int64;
+ scrub_pages : int64;
+ nr_nodes : int;
+ hwcap : int32 array;
+ physcap : int32;
}
external get : unit -> t = "stub_xl_physinfo"
-
end
module Sched_credit : sig
type t =
{
- weight: int;
- cap: int;
+ weight : int;
+ cap : int;
}
-
external domain_get : domid -> t = "stub_xl_sched_credit_domain_get"
external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"
end
module Topologyinfo : sig
type t =
{
- core: int;
- socket: int;
- node: int;
+ core : int;
+ socket : int;
+ node : int;
}
external get : unit -> t = "stub_xl_topologyinfo"
end
int i;
topologyinfo = caml_alloc_tuple(c_val->coremap.entries);
- for (i = 0; i < c_val->coremap.entries; i++) {
+ for (i = 0; i < c_val->coremap.entries; i++) {
v = Val_int(0); /* None */
if (c_val->coremap.array[i] != LIBXL_CPUARRAY_INVALID_ENTRY) {
topology = caml_alloc_tuple(3);
if (ret != 0)
failwith_xl("vkb_add", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
if (ret != 0)
failwith_xl("vkb_clean_shutdown", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
if (ret != 0)
failwith_xl("vkb_hard_shutdown", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
if (ret != 0)
failwith_xl("vfb_add", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
if (ret != 0)
failwith_xl("vfb_clean_shutdown", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
if (ret != 0)
failwith_xl("vfb_hard_shutdown", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
if (ret != 0)
failwith_xl("pci_add", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
if (ret != 0)
failwith_xl("pci_remove", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
if (ret != 0)
failwith_xl("pci_shutdown", &lg);
FREE_CTX();
-
+
CAMLreturn(Val_unit);
}
CAMLparam2(domid, button);
int ret;
INIT_STRUCT();
-
+
INIT_CTX();
ret = libxl_button_press(ctx, Int_val(domid), Int_val(button) + LIBXL_BUTTON_POWER);
if (ret != 0)