|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 28 of 32] tools: ocaml: reorder xl bindings type and
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1303315987 -3600
# Node ID 9efbf0a2ef1876ade982062e47af53d59abba93b
# Parent b142d87fd70402aeaf10c860bbb44339e2eafde2
tools: ocaml: reorder xl bindings type and function definitions to match IDL
Reduces the churn when comparing the before and after auto-generation
versions of the patch. (in practice the ocaml pre-autogeneration
bindings are so out of date that there isn't all that much benefit to
this though...)
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r b142d87fd704 -r 9efbf0a2ef18 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
@@ -15,6 +15,28 @@
exception Error of string
+type domid = int
+
+type console_type =
+ | CONSOLETYPE_XENCONSOLED
+ | CONSOLETYPE_IOEMU
+
+type disk_phystype =
+ | PHYSTYPE_QCOW
+ | PHYSTYPE_QCOW2
+ | PHYSTYPE_VHD
+ | PHYSTYPE_AIO
+ | PHYSTYPE_FILE
+ | PHYSTYPE_PHY
+
+type nic_type =
+ | NICTYPE_IOEMU
+ | NICTYPE_VIF
+
+type button =
+ | Button_Power
+ | Button_Sleep
+
module Domain_create_info = struct
type t =
{
@@ -31,6 +53,129 @@ module Domain_create_info = struct
}
end
+module Device_vfb = struct
+ type t =
+ {
+ backend_domid : domid;
+ devid : int;
+ vnc : bool;
+ vnclisten : string;
+ vncpasswd : string;
+ vncdisplay : int;
+ vncunused : bool;
+ keymap : string;
+ sdl : bool;
+ opengl : bool;
+ display : string;
+ xauthority : string;
+ }
+ external add : t -> domid -> unit = "stub_xl_device_vfb_add"
+ external clean_shutdown : domid -> unit =
"stub_xl_device_vfb_clean_shutdown"
+ external hard_shutdown : domid -> unit =
"stub_xl_device_vfb_hard_shutdown"
+end
+
+module Device_vkb = struct
+ type t =
+ {
+ 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"
+end
+
+module Device_console = struct
+ type t =
+ {
+ backend_domid : domid;
+ devid : int;
+ consoletype : console_type;
+ }
+
+ external add : t -> domid -> unit = "stub_xl_device_console_add"
+end
+
+module Device_disk = struct
+ type t =
+ {
+ backend_domid : domid;
+ physpath : string;
+ phystype : disk_phystype;
+ virtpath : string;
+ unpluggable : bool;
+ 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
+
+module Device_nic = struct
+ type t =
+ {
+ backend_domid : domid;
+ devid : int;
+ mtu : int;
+ model : string;
+ mac : int array;
+ bridge : string;
+ ifname : string;
+ script : string;
+ nictype : nic_type;
+ }
+ external add : t -> domid -> unit = "stub_xl_device_nic_add"
+ external del : t -> domid -> unit = "stub_xl_device_nic_del"
+end
+
+module Device_pci = struct
+ type t =
+ {
+ func : int;
+ dev : int;
+ bus : int;
+ domain : int;
+ vdevfn : int;
+ 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"
+end
+
+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;
+ }
+ external get : unit -> t = "stub_xl_physinfo"
+
+end
+
+module Sched_credit = struct
+ type t =
+ {
+ 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 Domain_build_info = struct
module Hvm = struct
type t =
@@ -70,137 +215,6 @@ module Domain_build_info = struct
}
end
-type domid = int
-
-type disk_phystype =
- | PHYSTYPE_QCOW
- | PHYSTYPE_QCOW2
- | PHYSTYPE_VHD
- | PHYSTYPE_AIO
- | PHYSTYPE_FILE
- | PHYSTYPE_PHY
-
-module Device_disk = struct
- type t =
- {
- backend_domid : domid;
- physpath : string;
- phystype : disk_phystype;
- virtpath : string;
- unpluggable : bool;
- 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
-
-type nic_type =
- | NICTYPE_IOEMU
- | NICTYPE_VIF
-
-module Device_nic = struct
- type t =
- {
- backend_domid : domid;
- devid : int;
- mtu : int;
- model : string;
- mac : int array;
- bridge : string;
- ifname : string;
- script : string;
- nictype : nic_type;
- }
- external add : t -> domid -> unit = "stub_xl_device_nic_add"
- external del : t -> domid -> unit = "stub_xl_device_nic_del"
-end
-
-type console_type =
- | CONSOLETYPE_XENCONSOLED
- | CONSOLETYPE_IOEMU
-
-module Device_console = struct
- type t =
- {
- backend_domid : domid;
- devid : int;
- consoletype : console_type;
- }
-
- external add : t -> domid -> unit = "stub_xl_device_console_add"
-end
-
-module Device_vkb = struct
- type t =
- {
- 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"
-end
-
-module Device_vfb = struct
- type t =
- {
- backend_domid : domid;
- devid : int;
- vnc : bool;
- vnclisten : string;
- vncpasswd : string;
- vncdisplay : int;
- vncunused : bool;
- keymap : string;
- sdl : bool;
- opengl : bool;
- display : string;
- xauthority : string;
- }
- external add : t -> domid -> unit = "stub_xl_device_vfb_add"
- external clean_shutdown : domid -> unit =
"stub_xl_device_vfb_clean_shutdown"
- external hard_shutdown : domid -> unit =
"stub_xl_device_vfb_hard_shutdown"
-end
-
-module Device_pci = struct
- type t =
- {
- func : int;
- dev : int;
- bus : int;
- domain : int;
- vdevfn : int;
- 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"
-end
-
-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;
- }
- external get : unit -> t = "stub_xl_physinfo"
-
-end
-
module Topologyinfo = struct
type t =
{
@@ -211,20 +225,6 @@ module Topologyinfo = struct
external get: unit -> t = "stub_xl_topologyinfo"
end
-module Sched_credit = struct
- type t =
- {
- 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
-
-type button =
- | Button_Power
- | Button_Sleep
-
external button_press : domid -> button -> unit = "stub_xl_button_press"
diff -r b142d87fd704 -r 9efbf0a2ef18 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
@@ -15,6 +15,28 @@
exception Error of string
+type domid = int
+
+type console_type =
+ | CONSOLETYPE_XENCONSOLED
+ | CONSOLETYPE_IOEMU
+
+type disk_phystype =
+ | PHYSTYPE_QCOW
+ | PHYSTYPE_QCOW2
+ | PHYSTYPE_VHD
+ | PHYSTYPE_AIO
+ | PHYSTYPE_FILE
+ | PHYSTYPE_PHY
+
+type nic_type =
+ | NICTYPE_IOEMU
+ | NICTYPE_VIF
+
+type button =
+ | Button_Power
+ | Button_Sleep
+
module Domain_create_info : sig
type t =
{
@@ -31,6 +53,130 @@ module Domain_create_info : sig
}
end
+module Device_vfb : sig
+ type t =
+ {
+ backend_domid : domid;
+ devid : int;
+ vnc : bool;
+ vnclisten : string;
+ vncpasswd : string;
+ vncdisplay : int;
+ vncunused : bool;
+ keymap : string;
+ sdl : bool;
+ opengl : bool;
+ display : string;
+ xauthority : string;
+ }
+ external add : t -> domid -> unit = "stub_xl_device_vfb_add"
+ external clean_shutdown : domid -> unit =
"stub_xl_device_vfb_clean_shutdown"
+ external hard_shutdown : domid -> unit =
"stub_xl_device_vfb_hard_shutdown"
+end
+
+module Device_vkb : sig
+ type t =
+ {
+ 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"
+end
+
+module Device_console : sig
+ type t =
+ {
+ backend_domid : domid;
+ devid : int;
+ consoletype : console_type;
+ }
+
+ external add : t -> domid -> unit = "stub_xl_device_console_add"
+end
+
+module Device_disk : sig
+ type t =
+ {
+ backend_domid : domid;
+ physpath : string;
+ phystype : disk_phystype;
+ virtpath : string;
+ unpluggable : bool;
+ 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
+
+module Device_nic : sig
+ type t =
+ {
+ backend_domid : domid;
+ devid : int;
+ mtu : int;
+ model : string;
+ mac : int array;
+ bridge : string;
+ ifname : string;
+ script : string;
+ nictype : nic_type;
+ }
+ external add : t -> domid -> unit = "stub_xl_device_nic_add"
+ external del : t -> domid -> unit = "stub_xl_device_nic_del"
+end
+
+module Device_pci : sig
+ type t =
+ {
+ func : int;
+ dev : int;
+ bus : int;
+ domain : int;
+ vdevfn : int;
+ 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"
+end
+
+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;
+ }
+ external get : unit -> t = "stub_xl_physinfo"
+
+end
+
+module Sched_credit : sig
+ type t =
+ {
+ 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 Domain_build_info : sig
module Hvm : sig
type t =
@@ -70,137 +216,6 @@ module Domain_build_info : sig
}
end
-type domid = int
-
-type disk_phystype =
- | PHYSTYPE_QCOW
- | PHYSTYPE_QCOW2
- | PHYSTYPE_VHD
- | PHYSTYPE_AIO
- | PHYSTYPE_FILE
- | PHYSTYPE_PHY
-
-module Device_disk : sig
- type t =
- {
- backend_domid : domid;
- physpath : string;
- phystype : disk_phystype;
- virtpath : string;
- unpluggable : bool;
- 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
-
-type nic_type =
- | NICTYPE_IOEMU
- | NICTYPE_VIF
-
-module Device_nic : sig
- type t =
- {
- backend_domid : domid;
- devid : int;
- mtu : int;
- model : string;
- mac : int array;
- bridge : string;
- ifname : string;
- script : string;
- nictype : nic_type;
- }
- external add : t -> domid -> unit = "stub_xl_device_nic_add"
- external del : t -> domid -> unit = "stub_xl_device_nic_del"
-end
-
-type console_type =
- | CONSOLETYPE_XENCONSOLED
- | CONSOLETYPE_IOEMU
-
-module Device_console : sig
- type t =
- {
- backend_domid : domid;
- devid : int;
- consoletype : console_type;
- }
-
- external add : t -> domid -> unit = "stub_xl_device_console_add"
-end
-
-module Device_vkb : sig
- type t =
- {
- 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"
-end
-
-module Device_vfb : sig
- type t =
- {
- backend_domid : domid;
- devid : int;
- vnc : bool;
- vnclisten : string;
- vncpasswd : string;
- vncdisplay : int;
- vncunused : bool;
- keymap : string;
- sdl : bool;
- opengl : bool;
- display : string;
- xauthority : string;
- }
- external add : t -> domid -> unit = "stub_xl_device_vfb_add"
- external clean_shutdown : domid -> unit =
"stub_xl_device_vfb_clean_shutdown"
- external hard_shutdown : domid -> unit =
"stub_xl_device_vfb_hard_shutdown"
-end
-
-module Device_pci : sig
- type t =
- {
- func : int;
- dev : int;
- bus : int;
- domain : int;
- vdevfn : int;
- 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"
-end
-
-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;
- }
- external get : unit -> t = "stub_xl_physinfo"
-
-end
-
module Topologyinfo : sig
type t =
{
@@ -211,21 +226,6 @@ module Topologyinfo : sig
external get : unit -> t = "stub_xl_topologyinfo"
end
-module Sched_credit : sig
- type t =
- {
- 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
-
-type button =
- | Button_Power
- | Button_Sleep
-
external button_press : domid -> button -> unit = "stub_xl_button_press"
external send_trigger : domid -> string -> int -> unit = "stub_xl_send_trigger"
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 20 of 32] tools: ocaml: rename the build_info types and functions, (continued)
- [Xen-devel] [PATCH 20 of 32] tools: ocaml: rename the build_info types and functions, Ian Campbell
- [Xen-devel] [PATCH 23 of 32] tools: ocaml: rename the sched_credit types and functions, Ian Campbell
- [Xen-devel] [PATCH 22 of 32] tools: ocaml: rename the physinfo types and functions, Ian Campbell
- [Xen-devel] [PATCH 21 of 32] tools: ocaml: rename the domain_build_state types and functions, Ian Campbell
- [Xen-devel] [PATCH 24 of 32] tools: ocaml: rename the topology types and functions, Ian Campbell
- [Xen-devel] [PATCH 29 of 32] tools: ocaml: remove create_info and build_info data types from xl bindings, Ian Campbell
- [Xen-devel] [PATCH 25 of 32] tools: libxl: remove libxl_domain_build_state from the IDL, Ian Campbell
- [Xen-devel] [PATCH 26 of 32] tools: libxl: remove Reference meta-type from IDL, Ian Campbell
- [Xen-devel] [PATCH 27 of 32] tools: libxl: reduce number of integer types in the IDL, Ian Campbell
- [Xen-devel] [PATCH 30 of 32] tools: ocaml: tweak whitespace in preparation for autogenerating xl bindings, Ian Campbell
- [Xen-devel] [PATCH 28 of 32] tools: ocaml: reorder xl bindings type and function definitions to match IDL,
Ian Campbell <=
- [Xen-devel] [PATCH 31 of 32] tools: ocaml: lay ground work for auto generating xl datatypes, Ian Campbell
- [Xen-devel] [PATCH 32 of 32] tools: ocaml: autogenerate xl datatype definitions and ocaml<->C conversion, Ian Campbell
|
|
|
|
|