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 22 of 24] tools: ocaml: tweak whitespace in preparati

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 22 of 24] tools: ocaml: tweak whitespace in preparation for autogenerating xl bindings
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Wed, 13 Apr 2011 15:37:03 +0100
Cc: Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>, Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Delivery-date: Wed, 13 Apr 2011 08:03:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1302705401@xxxxxxxxxxxxxxxxxxxxxxxxx>
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.1302705401@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302698152 -3600
# Node ID 3c51e7bfe28948bcd354cfc2ab2083d2ddb94d22
# Parent  a5704e01a60669dbc6d07416f936d330614d28a1
tools: ocaml: tweak whitespace in preparation for autogenerating xl bindings

Reduces the diff of existing vs auto-generated code.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r a5704e01a606 -r 3c51e7bfe289 tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Wed Apr 13 13:35:52 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Wed Apr 13 13:35:52 2011 +0100
@@ -64,7 +64,6 @@ module Device_vkb = struct
                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"
@@ -81,7 +80,6 @@ module Device_disk = struct
                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
@@ -114,7 +112,6 @@ module Device_pci = struct
                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"
@@ -123,17 +120,17 @@ 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;
+               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"
 
@@ -142,8 +139,8 @@ end
 module Sched_credit = struct
        type t =
        {
-               weight: int;
-               cap: int;
+               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"
@@ -166,18 +163,17 @@ module Device_console = struct
                devid : int;
                consoletype : console_type;
        }
-
        external add : t -> Device_build_state.t -> domid -> unit = 
"stub_xl_device_console_add"
 end
 
 module Topologyinfo = struct
        type t =
        {
-               core: int;
-               socket: int;
-               node: int;
+               core : int;
+               socket : int;
+               node : int;
        }
-       external get: unit -> t = "stub_xl_topologyinfo"
+       external get : unit -> t = "stub_xl_topologyinfo"
 end
 
 external button_press : domid -> button -> unit = "stub_xl_button_press"
diff -r a5704e01a606 -r 3c51e7bfe289 tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli        Wed Apr 13 13:35:52 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.mli        Wed Apr 13 13:35:52 2011 +0100
@@ -64,7 +64,6 @@ module Device_vkb : sig
                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"
@@ -81,7 +80,6 @@ module Device_disk : sig
                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
@@ -114,7 +112,6 @@ module Device_pci : sig
                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"
@@ -123,29 +120,27 @@ 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;
+               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;
+               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
@@ -174,9 +169,9 @@ end
 module Topologyinfo : sig
        type t =
        {
-               core: int;
-               socket: int;
-               node: int;
+               core : int;
+               socket : int;
+               node : int;
        }
        external get : unit -> t = "stub_xl_topologyinfo"
 end
diff -r a5704e01a606 -r 3c51e7bfe289 tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c    Wed Apr 13 13:35:52 2011 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c    Wed Apr 13 13:35:52 2011 +0100
@@ -245,7 +245,7 @@ static int domain_build_state_val(caml_g
        c_val->store_mfn = Int64_val(Field(v, 1));
        c_val->console_port = Int_val(Field(v, 2));
        c_val->console_mfn = Int64_val(Field(v, 3));
-       
+
        CAMLreturn(0);
 }
 
@@ -295,7 +295,7 @@ static value Val_topologyinfo(libxl_topo
        int i;
 
        topologyinfo = caml_alloc_tuple(c_val->coremap.entries);
-       for (i = 0; i < c_val->coremap.entries; i++) {  
+       for (i = 0; i < c_val->coremap.entries; i++) {
                v = Val_int(0); /* None */
                if (c_val->coremap.array[i] != LIBXL_CPUARRAY_INVALID_ENTRY) {
                        topology = caml_alloc_tuple(3);
@@ -413,7 +413,7 @@ value stub_xl_device_vkb_add(value info,
        if (ret != 0)
                failwith_xl("vkb_add", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -428,7 +428,7 @@ value stub_xl_device_vkb_clean_shutdown(
        if (ret != 0)
                failwith_xl("vkb_clean_shutdown", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -443,7 +443,7 @@ value stub_xl_device_vkb_hard_shutdown(v
        if (ret != 0)
                failwith_xl("vkb_hard_shutdown", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -461,7 +461,7 @@ value stub_xl_device_vfb_add(value info,
        if (ret != 0)
                failwith_xl("vfb_add", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -476,7 +476,7 @@ value stub_xl_device_vfb_clean_shutdown(
        if (ret != 0)
                failwith_xl("vfb_clean_shutdown", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -491,7 +491,7 @@ value stub_xl_device_vfb_hard_shutdown(v
        if (ret != 0)
                failwith_xl("vfb_hard_shutdown", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -509,7 +509,7 @@ value stub_xl_device_pci_add(value info,
        if (ret != 0)
                failwith_xl("pci_add", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -527,7 +527,7 @@ value stub_xl_device_pci_remove(value in
        if (ret != 0)
                failwith_xl("pci_remove", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -542,7 +542,7 @@ value stub_xl_device_pci_shutdown(value 
        if (ret != 0)
                failwith_xl("pci_shutdown", &lg);
        FREE_CTX();
-       
+
        CAMLreturn(Val_unit);
 }
 
@@ -551,7 +551,7 @@ value stub_xl_button_press(value domid, 
        CAMLparam2(domid, button);
        int ret;
        INIT_STRUCT();
-       
+
        INIT_CTX();
        ret = libxl_button_press(ctx, Int_val(domid), Int_val(button) + 
LIBXL_BUTTON_POWER);
        if (ret != 0)

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

<Prev in Thread] Current Thread [Next in Thread>