[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 20 of 24] tools: ocaml: reorder xl bindings type and function definitions to match IDL



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302698152 -3600
# Node ID 91209ee048a9b7f3eed4ec42c00fe22dcb06ad51
# Parent  cdf5d9feb563b274235953579d8c991f38b7ca22
tools: ocaml: reorder xl bindings type and function definitions to match IDL

Reduces the churn when comparing the before and after auto-generation
versions of the patch. (in practice the ocaml pre-autogeneration
bindings are so out of date that there isn't all that much benefit to
this though...)

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

diff -r cdf5d9feb563 -r 91209ee048a9 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
@@ -15,6 +15,28 @@
 
 exception Error of string
 
+type domid = int
+
+type console_type =
+       | CONSOLETYPE_XENCONSOLED
+       | CONSOLETYPE_IOEMU
+
+type disk_phystype =
+       | PHYSTYPE_QCOW
+       | PHYSTYPE_QCOW2
+       | PHYSTYPE_VHD
+       | PHYSTYPE_AIO
+       | PHYSTYPE_FILE
+       | PHYSTYPE_PHY
+
+type nic_type =
+       | NICTYPE_IOEMU
+       | NICTYPE_VIF
+
+type button =
+       | Button_Power
+       | Button_Sleep
+
 module Domain_create_info = struct
        type t =
        {
@@ -31,6 +53,118 @@ module Domain_create_info = struct
        }
 end
 
+module Device_vfb = struct
+       type t =
+       {
+               backend_domid : domid;
+               devid : int;
+               vnc : bool;
+               vnclisten : string;
+               vncpasswd : string;
+               vncdisplay : int;
+               vncunused : bool;
+               keymap : string;
+               sdl : bool;
+               opengl : bool;
+               display : string;
+               xauthority : string;
+       }
+       external add : t -> domid -> unit = "stub_xl_device_vfb_add"
+       external clean_shutdown : domid -> unit = 
"stub_xl_device_vfb_clean_shutdown"
+       external hard_shutdown : domid -> unit = 
"stub_xl_device_vfb_hard_shutdown"
+end
+
+module Device_vkb = struct
+       type t =
+       {
+               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"
+end
+
+module Device_disk = struct
+       type t =
+       {
+               backend_domid : domid;
+               physpath : string;
+               phystype : disk_phystype;
+               virtpath : string;
+               unpluggable : bool;
+               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
+
+module Device_nic = struct
+       type t =
+       {
+               backend_domid : domid;
+               devid : int;
+               mtu : int;
+               model : string;
+               mac : int array;
+               bridge : string;
+               ifname : string;
+               script : string;
+               nictype : nic_type;
+       }
+       external add : t -> domid -> unit = "stub_xl_device_nic_add"
+       external del : t -> domid -> unit = "stub_xl_device_nic_del"
+end
+
+module Device_pci = struct
+       type t =
+       {
+               func : int;
+               dev : int;
+               bus : int;
+               domain : int;
+               vdevfn : int;
+               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"
+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;
+       }
+       external get : unit -> t = "stub_xl_physinfo"
+
+end
+
+module Sched_credit = struct
+       type t =
+       {
+               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
+
 module Domain_build_info = struct
        module Hvm = struct
                type t =
@@ -80,57 +214,6 @@ module Device_build_state = struct
        }
 end
 
-type domid = int
-
-type disk_phystype =
-       | PHYSTYPE_QCOW
-       | PHYSTYPE_QCOW2
-       | PHYSTYPE_VHD
-       | PHYSTYPE_AIO
-       | PHYSTYPE_FILE
-       | PHYSTYPE_PHY
-
-module Device_disk = struct
-       type t =
-       {
-               backend_domid : domid;
-               physpath : string;
-               phystype : disk_phystype;
-               virtpath : string;
-               unpluggable : bool;
-               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
-
-type nic_type =
-       | NICTYPE_IOEMU
-       | NICTYPE_VIF
-
-module Device_nic = struct
-       type t =
-       {
-               backend_domid : domid;
-               devid : int;
-               mtu : int;
-               model : string;
-               mac : int array;
-               bridge : string;
-               ifname : string;
-               script : string;
-               nictype : nic_type;
-       }
-       external add : t -> domid -> unit = "stub_xl_device_nic_add"
-       external del : t -> domid -> unit = "stub_xl_device_nic_del"
-end
-
-type console_type =
-       | CONSOLETYPE_XENCONSOLED
-       | CONSOLETYPE_IOEMU
-
 module Device_console = struct
        type t =
        {
@@ -142,75 +225,6 @@ module Device_console = struct
        external add : t -> Device_build_state.t -> domid -> unit = 
"stub_xl_device_console_add"
 end
 
-module Device_vkb = struct
-       type t =
-       {
-               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"
-end
-
-module Device_vfb = struct
-       type t =
-       {
-               backend_domid : domid;
-               devid : int;
-               vnc : bool;
-               vnclisten : string;
-               vncpasswd : string;
-               vncdisplay : int;
-               vncunused : bool;
-               keymap : string;
-               sdl : bool;
-               opengl : bool;
-               display : string;
-               xauthority : string;
-       }
-       external add : t -> domid -> unit = "stub_xl_device_vfb_add"
-       external clean_shutdown : domid -> unit = 
"stub_xl_device_vfb_clean_shutdown"
-       external hard_shutdown : domid -> unit = 
"stub_xl_device_vfb_hard_shutdown"
-end
-
-module Device_pci = struct
-       type t =
-       {
-               func : int;
-               dev : int;
-               bus : int;
-               domain : int;
-               vdevfn : int;
-               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"
-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;
-       }
-       external get : unit -> t = "stub_xl_physinfo"
-
-end
-
 module Topologyinfo = struct
        type t =
        {
@@ -221,20 +235,6 @@ module Topologyinfo = struct
        external get: unit -> t = "stub_xl_topologyinfo"
 end
 
-module Sched_credit = struct
-       type t =
-       {
-               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
-
-type button =
-       | Button_Power
-       | Button_Sleep
-
 external button_press : domid -> button -> unit = "stub_xl_button_press"
 
 
diff -r cdf5d9feb563 -r 91209ee048a9 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
@@ -15,6 +15,28 @@
 
 exception Error of string
 
+type domid = int
+
+type console_type =
+       | CONSOLETYPE_XENCONSOLED
+       | CONSOLETYPE_IOEMU
+
+type disk_phystype =
+       | PHYSTYPE_QCOW
+       | PHYSTYPE_QCOW2
+       | PHYSTYPE_VHD
+       | PHYSTYPE_AIO
+       | PHYSTYPE_FILE
+       | PHYSTYPE_PHY
+
+type nic_type =
+       | NICTYPE_IOEMU
+       | NICTYPE_VIF
+
+type button =
+       | Button_Power
+       | Button_Sleep
+
 module Domain_create_info : sig
        type t =
        {
@@ -31,6 +53,119 @@ module Domain_create_info : sig
        }
 end
 
+module Device_vfb : sig
+       type t =
+       {
+               backend_domid : domid;
+               devid : int;
+               vnc : bool;
+               vnclisten : string;
+               vncpasswd : string;
+               vncdisplay : int;
+               vncunused : bool;
+               keymap : string;
+               sdl : bool;
+               opengl : bool;
+               display : string;
+               xauthority : string;
+       }
+       external add : t -> domid -> unit = "stub_xl_device_vfb_add"
+       external clean_shutdown : domid -> unit = 
"stub_xl_device_vfb_clean_shutdown"
+       external hard_shutdown : domid -> unit = 
"stub_xl_device_vfb_hard_shutdown"
+end
+
+module Device_vkb : sig
+       type t =
+       {
+               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"
+end
+
+module Device_disk : sig
+       type t =
+       {
+               backend_domid : domid;
+               physpath : string;
+               phystype : disk_phystype;
+               virtpath : string;
+               unpluggable : bool;
+               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
+
+module Device_nic : sig
+       type t =
+       {
+               backend_domid : domid;
+               devid : int;
+               mtu : int;
+               model : string;
+               mac : int array;
+               bridge : string;
+               ifname : string;
+               script : string;
+               nictype : nic_type;
+       }
+       external add : t -> domid -> unit = "stub_xl_device_nic_add"
+       external del : t -> domid -> unit = "stub_xl_device_nic_del"
+end
+
+module Device_pci : sig
+       type t =
+       {
+               func : int;
+               dev : int;
+               bus : int;
+               domain : int;
+               vdevfn : int;
+               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"
+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;
+       }
+       external get : unit -> t = "stub_xl_physinfo"
+
+end
+
+module Sched_credit : sig
+       type t =
+       {
+               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
+
 module Domain_build_info : sig
        module Hvm : sig
                type t =
@@ -80,57 +215,6 @@ module Device_build_state : sig
        }
 end
 
-type domid = int
-
-type disk_phystype =
-       | PHYSTYPE_QCOW
-       | PHYSTYPE_QCOW2
-       | PHYSTYPE_VHD
-       | PHYSTYPE_AIO
-       | PHYSTYPE_FILE
-       | PHYSTYPE_PHY
-
-module Device_disk : sig
-       type t =
-       {
-               backend_domid : domid;
-               physpath : string;
-               phystype : disk_phystype;
-               virtpath : string;
-               unpluggable : bool;
-               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
-
-type nic_type =
-       | NICTYPE_IOEMU
-       | NICTYPE_VIF
-
-module Device_nic : sig
-       type t =
-       {
-               backend_domid : domid;
-               devid : int;
-               mtu : int;
-               model : string;
-               mac : int array;
-               bridge : string;
-               ifname : string;
-               script : string;
-               nictype : nic_type;
-       }
-       external add : t -> domid -> unit = "stub_xl_device_nic_add"
-       external del : t -> domid -> unit = "stub_xl_device_nic_del"
-end
-
-type console_type =
-       | CONSOLETYPE_XENCONSOLED
-       | CONSOLETYPE_IOEMU
-
 module Device_console : sig
        type t =
        {
@@ -142,75 +226,6 @@ module Device_console : sig
        external add : t -> Device_build_state.t -> domid -> unit = 
"stub_xl_device_console_add"
 end
 
-module Device_vkb : sig
-       type t =
-       {
-               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"
-end
-
-module Device_vfb : sig
-       type t =
-       {
-               backend_domid : domid;
-               devid : int;
-               vnc : bool;
-               vnclisten : string;
-               vncpasswd : string;
-               vncdisplay : int;
-               vncunused : bool;
-               keymap : string;
-               sdl : bool;
-               opengl : bool;
-               display : string;
-               xauthority : string;
-       }
-       external add : t -> domid -> unit = "stub_xl_device_vfb_add"
-       external clean_shutdown : domid -> unit = 
"stub_xl_device_vfb_clean_shutdown"
-       external hard_shutdown : domid -> unit = 
"stub_xl_device_vfb_hard_shutdown"
-end
-
-module Device_pci : sig
-       type t =
-       {
-               func : int;
-               dev : int;
-               bus : int;
-               domain : int;
-               vdevfn : int;
-               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"
-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;
-       }
-       external get : unit -> t = "stub_xl_physinfo"
-
-end
-
 module Topologyinfo : sig
        type t =
        {
@@ -221,21 +236,6 @@ module Topologyinfo : sig
        external get : unit -> t = "stub_xl_topologyinfo"
 end
 
-module Sched_credit : sig
-       type t =
-       {
-               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
-
-type button =
-       | Button_Power
-       | Button_Sleep
-
 external button_press : domid -> button -> unit = "stub_xl_button_press"
 
 external send_trigger : domid -> string -> int -> unit = "stub_xl_send_trigger"

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.