WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 04 of 14] tools: ocaml: rename the console types and

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 04 of 14] tools: ocaml: rename the console types and functions
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Wed, 30 Mar 2011 19:05:25 +0100
Delivery-date: Wed, 30 Mar 2011 14:37:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1301508321@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1301508321@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1301507668 -3600
# Node ID 6aa054dd7ba1d9bddb06a9499c1f292550f9435b
# Parent  6ca09bec9c49ccf3b93606fd3f5fd807c9438cc1
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@xxxxxxxxxxxxx>

diff -r 6ca09bec9c49 -r 6aa054dd7ba1 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 =
 {
@@ -185,8 +189,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 6ca09bec9c49 -r 6aa054dd7ba1 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 =
 {
@@ -185,8 +189,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 6ca09bec9c49 -r 6aa054dd7ba1 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
@@ -433,7 +433,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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel