xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 30 of 32] tools: ocaml: tweak whitespace in preparation for autogenerating xl bindings
Date: Wed, 20 Apr 2011 17:15:49 +0100	[thread overview]
Message-ID: <30e7e76df3ad5ca3b25d.1303316149@cosworth.uk.xensource.com> (raw)
In-Reply-To: <patchbomb.1303316119@cosworth.uk.xensource.com>

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1303315988 -3600
# Node ID 30e7e76df3ad5ca3b25d10dab25c10352fc2df68
# Parent  9586790030d8221db24e78f5ca9f0b1a10a480d2
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@citrix.com>

diff -r 9586790030d8 -r 30e7e76df3ad tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml	Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.ml	Wed Apr 20 17:13:08 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"
@@ -77,7 +76,6 @@ module Device_console = struct
 		devid : int;
 		consoletype : console_type;
 	}
-
 	external add : t -> domid -> unit = "stub_xl_device_console_add"
 end
 
@@ -92,7 +90,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
@@ -125,7 +122,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"
@@ -134,17 +130,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"
 
@@ -153,8 +149,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"
@@ -163,11 +159,11 @@ 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 9586790030d8 -r 30e7e76df3ad tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli	Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.mli	Wed Apr 20 17:13:08 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"
@@ -92,7 +91,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
@@ -125,7 +123,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"
@@ -134,29 +131,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
@@ -164,9 +159,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 9586790030d8 -r 30e7e76df3ad tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c	Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c	Wed Apr 20 17:13:08 2011 +0100
@@ -283,7 +283,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);
@@ -398,7 +398,7 @@ value stub_xl_device_vkb_add(value info,
 	if (ret != 0)
 		failwith_xl("vkb_add", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -413,7 +413,7 @@ value stub_xl_device_vkb_clean_shutdown(
 	if (ret != 0)
 		failwith_xl("vkb_clean_shutdown", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -428,7 +428,7 @@ value stub_xl_device_vkb_hard_shutdown(v
 	if (ret != 0)
 		failwith_xl("vkb_hard_shutdown", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -446,7 +446,7 @@ value stub_xl_device_vfb_add(value info,
 	if (ret != 0)
 		failwith_xl("vfb_add", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -461,7 +461,7 @@ value stub_xl_device_vfb_clean_shutdown(
 	if (ret != 0)
 		failwith_xl("vfb_clean_shutdown", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -476,7 +476,7 @@ value stub_xl_device_vfb_hard_shutdown(v
 	if (ret != 0)
 		failwith_xl("vfb_hard_shutdown", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -494,7 +494,7 @@ value stub_xl_device_pci_add(value info,
 	if (ret != 0)
 		failwith_xl("pci_add", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -512,7 +512,7 @@ value stub_xl_device_pci_remove(value in
 	if (ret != 0)
 		failwith_xl("pci_remove", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -527,7 +527,7 @@ value stub_xl_device_pci_shutdown(value 
 	if (ret != 0)
 		failwith_xl("pci_shutdown", &lg);
 	FREE_CTX();
-	
+
 	CAMLreturn(Val_unit);
 }
 
@@ -536,7 +536,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)

  parent reply	other threads:[~2011-04-20 16:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 16:15 [PATCH 00 of 32] [V2] tools: libxl IDL, SeaBIOS, ocaml binding autogeneration, misc Ian Campbell
2011-04-20 16:15 ` [PATCH 01 of 32] tools: libxl: hide selection of hvmloader by default Ian Campbell
2011-04-20 16:15 ` [PATCH 02 of 32] tools: libxl: hide selection of device-model " Ian Campbell
2011-04-20 16:15 ` [PATCH 03 of 32] tools: libxl: write selected BIOS to xenstore Ian Campbell
2011-04-20 16:15 ` [PATCH 04 of 32] tools: support SeaBIOS. Use by default when upstream qemu is configured Ian Campbell
2011-04-20 16:15 ` [PATCH 05 of 32] tools: libxl: move all enum values into the libxl namespace Ian Campbell
2011-04-20 16:15 ` [PATCH 06 of 32] tools: libxl: generalize libxl_qemu_machine_type into libxl_domain_type Ian Campbell
2011-04-20 16:15 ` [PATCH 07 of 32] tools: libxl: namespace enum values within their type Ian Campbell
2011-04-20 16:15 ` [PATCH 08 of 32] tools: libxl: add an Enumeration type to the IDL Ian Campbell
2011-04-20 16:15 ` [PATCH 09 of 32] tools: libxl: add libxl_domid to IDL Ian Campbell
2011-04-20 16:15 ` [PATCH 10 of 32] tools: libxl: remove BitField type class from IDL Ian Campbell
2011-04-20 16:15 ` [PATCH 11 of 32] tools: libxl: add concept of in- and out-put only data types to IDL Ian Campbell
2011-04-20 16:15 ` [PATCH 12 of 32] tools: libxl: do not specify protocol node for disk or net Ian Campbell
2011-04-20 16:15 ` [PATCH 13 of 32] tools: ocaml: rename the device_nic types and functions Ian Campbell
2011-04-20 16:15 ` [PATCH 14 of 32] tools: ocaml: rename the disk_info " Ian Campbell
2011-04-20 16:15 ` [PATCH 15 of 32] tools: ocaml: rename the console " Ian Campbell
2011-04-20 16:15 ` [PATCH 16 of 32] tools: ocaml: rename the vkb " Ian Campbell
2011-04-20 16:15 ` [PATCH 17 of 32] tools: ocaml: rename the pci " Ian Campbell
2011-04-20 16:15 ` [PATCH 18 of 32] tools: ocaml: remove the domain_make and domain_build functions since they don't work Ian Campbell
2011-04-20 16:15 ` [PATCH 19 of 32] tools: ocaml: rename the create_info types and functions Ian Campbell
2011-04-20 16:15 ` [PATCH 20 of 32] tools: ocaml: rename the build_info " Ian Campbell
2011-04-20 16:15 ` [PATCH 21 of 32] tools: ocaml: rename the domain_build_state " Ian Campbell
2011-04-20 16:15 ` [PATCH 22 of 32] tools: ocaml: rename the physinfo " Ian Campbell
2011-04-20 16:15 ` [PATCH 23 of 32] tools: ocaml: rename the sched_credit " Ian Campbell
2011-04-20 16:15 ` [PATCH 24 of 32] tools: ocaml: rename the topology " Ian Campbell
2011-04-20 16:15 ` [PATCH 25 of 32] tools: libxl: remove libxl_domain_build_state from the IDL Ian Campbell
2011-04-20 16:15 ` [PATCH 26 of 32] tools: libxl: remove Reference meta-type from IDL Ian Campbell
2011-04-20 16:15 ` [PATCH 27 of 32] tools: libxl: reduce number of integer types in the IDL Ian Campbell
2011-04-20 16:15 ` [PATCH 28 of 32] tools: ocaml: reorder xl bindings type and function definitions to match IDL Ian Campbell
2011-04-20 16:15 ` [PATCH 29 of 32] tools: ocaml: remove create_info and build_info data types from xl bindings Ian Campbell
2011-04-20 16:15 ` Ian Campbell [this message]
2011-04-20 16:15 ` [PATCH 31 of 32] tools: ocaml: lay ground work for auto generating xl datatypes Ian Campbell
2011-04-20 16:15 ` [PATCH 32 of 32] tools: ocaml: autogenerate xl datatype definitions and ocaml<->C conversion Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2011-04-18 13:53 [PATCH 00 of 32] tools: libxl IDL, SeaBIOS, ocaml binding autogeneration, misc Ian Campbell
2011-04-18 13:53 ` [PATCH 30 of 32] tools: ocaml: tweak whitespace in preparation for autogenerating xl bindings Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30e7e76df3ad5ca3b25d.1303316149@cosworth.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).