diff options
author | David Scott <dave.scott@eu.citrix.com> | 2011-03-30 18:54:28 +0100 |
---|---|---|
committer | David Scott <dave.scott@eu.citrix.com> | 2011-03-30 18:54:28 +0100 |
commit | 21fadf30af1418207dcdb8340674aa2e6730c164 (patch) | |
tree | 7e213d6492f30b42830e9e9d0a65519514989d47 /tools/ocaml | |
parent | dc11e2762d619d396d54648611a9d8b11ca4eb24 (diff) | |
download | xen-21fadf30af1418207dcdb8340674aa2e6730c164.tar.gz xen-21fadf30af1418207dcdb8340674aa2e6730c164.tar.bz2 xen-21fadf30af1418207dcdb8340674aa2e6730c164.zip |
tools: ocaml: rename the console types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
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>
Diffstat (limited to 'tools/ocaml')
-rw-r--r-- | tools/ocaml/libs/xl/xl.ml | 18 | ||||
-rw-r--r-- | tools/ocaml/libs/xl/xl.mli | 18 | ||||
-rw-r--r-- | tools/ocaml/libs/xl/xl_stubs.c | 2 |
3 files changed, 21 insertions, 17 deletions
diff --git a/tools/ocaml/libs/xl/xl.ml b/tools/ocaml/libs/xl/xl.ml index 1be9efe657..a6024728c6 100644 --- a/tools/ocaml/libs/xl/xl.ml +++ b/tools/ocaml/libs/xl/xl.ml @@ -123,12 +123,16 @@ type console_type = | CONSOLETYPE_XENCONSOLED | CONSOLETYPE_IOEMU -type console_info = -{ - backend_domid : domid; - devid : int; - consoletype : console_type; -} +module Device_console = struct + type t = + { + backend_domid : domid; + devid : int; + consoletype : console_type; + } + + external add : t -> build_state -> domid -> unit = "stub_xl_device_console_add" +end type vkb_info = { @@ -196,8 +200,6 @@ type sched_credit = external domain_make : create_info -> domid = "stub_xl_domain_make" external domain_build : build_info -> domid -> build_state = "stub_xl_domain_build" -external console_add : console_info -> build_state -> domid -> unit = "stub_xl_console_add" - external vkb_add : vkb_info -> domid -> unit = "stub_xl_vkb_add" external vkb_clean_shutdown : domid -> unit = "stub_vkb_clean_shutdown" external vkb_hard_shutdown : domid -> unit = "stub_vkb_hard_shutdown" diff --git a/tools/ocaml/libs/xl/xl.mli b/tools/ocaml/libs/xl/xl.mli index 11fc1c132e..cf77e1d520 100644 --- a/tools/ocaml/libs/xl/xl.mli +++ b/tools/ocaml/libs/xl/xl.mli @@ -123,12 +123,16 @@ type console_type = | CONSOLETYPE_XENCONSOLED | CONSOLETYPE_IOEMU -type console_info = -{ - backend_domid : domid; - devid : int; - consoletype : console_type; -} +module Device_console : sig + type t = + { + backend_domid : domid; + devid : int; + consoletype : console_type; + } + + external add : t -> build_state -> domid -> unit = "stub_xl_device_console_add" +end type vkb_info = { @@ -196,8 +200,6 @@ type sched_credit = external domain_make : create_info -> domid = "stub_xl_domain_make" external domain_build : build_info -> domid -> build_state = "stub_xl_domain_build" -external console_add : console_info -> build_state -> domid -> unit = "stub_xl_console_add" - external vkb_add : vkb_info -> domid -> unit = "stub_xl_vkb_add" external vkb_clean_shutdown : domid -> unit = "stub_vkb_clean_shutdown" external vkb_hard_shutdown : domid -> unit = "stub_vkb_hard_shutdown" diff --git a/tools/ocaml/libs/xl/xl_stubs.c b/tools/ocaml/libs/xl/xl_stubs.c index 692bf071f6..3ded26ee75 100644 --- a/tools/ocaml/libs/xl/xl_stubs.c +++ b/tools/ocaml/libs/xl/xl_stubs.c @@ -436,7 +436,7 @@ value stub_xl_device_nic_del(value info, value domid) CAMLreturn(Val_unit); } -value stub_xl_console_add(value info, value state, value domid) +value stub_xl_device_console_add(value info, value state, value domid) { CAMLparam3(info, state, domid); libxl_device_console c_info; |