Mailing List Archive

[PATCH 15 of 32] tools: ocaml: rename the console types and functions
# HG changeset patch
# User David Scott <dave.scott@eu.citrix.com>
# Date 1301507668 -3600
# Node ID fc18a1fc6e429277e1a59970cdd99690566b10a4
# Parent c814e6e9c50b4b07de1fa681cc175540bc09154e
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>

diff -r c814e6e9c50b -r fc18a1fc6e42 tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Wed Mar 30 18:54:28 2011 +0100
@@ -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 -r c814e6e9c50b -r fc18a1fc6e42 tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.mli Wed Mar 30 18:54:28 2011 +0100
@@ -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 -r c814e6e9c50b -r fc18a1fc6e42 tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c Wed Mar 30 18:54:28 2011 +0100
@@ -436,7 +436,7 @@ value stub_xl_device_nic_del(value info,
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;

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
[PATCH 15 of 32] tools: ocaml: rename the console types and functions [ In reply to ]
# HG changeset patch
# User David Scott <dave.scott@eu.citrix.com>
# Date 1301507668 -3600
# Node ID b283510b15423d7d64dc0779835822bbfbf6ed94
# Parent 3d4209b8a54a00c00acb414b8a706940c29d073e
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>

diff -r 3d4209b8a54a -r b283510b1542 tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Wed Mar 30 18:54:28 2011 +0100
@@ -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 -r 3d4209b8a54a -r b283510b1542 tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.mli Wed Mar 30 18:54:28 2011 +0100
@@ -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 -r 3d4209b8a54a -r b283510b1542 tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c Wed Mar 30 18:54:28 2011 +0100
@@ -436,7 +436,7 @@ value stub_xl_device_nic_del(value info,
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;

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel