]> xenbits.xensource.com Git - xen.git/commitdiff
tools: ocaml: rename the console types and functions
authorDavid Scott <dave.scott@eu.citrix.com>
Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)
committerDavid Scott <dave.scott@eu.citrix.com>
Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)
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>
tools/ocaml/libs/xl/xl.ml
tools/ocaml/libs/xl/xl.mli
tools/ocaml/libs/xl/xl_stubs.c

index 1be9efe657535a50160d186f74791f05144759df..a6024728c66745bba3607a9bb5b315df7b4576de 100644 (file)
@@ -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"
index 11fc1c132e5d5b7df7352a123ec3379a60569536..cf77e1d520df7ab3de34d027ad86d20704fdc7e1 100644 (file)
@@ -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"
index 692bf071f623982f059029299665b164594f51d4..3ded26ee7544a302118d5c7ffe9a496b58ec8b9d 100644 (file)
@@ -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;