]> xenbits.xensource.com Git - xen.git/commitdiff
tools: ocaml: reorder xl bindings type and function definitions to match IDL
authorIan Campbell <ian.campbell@citrix.com>
Wed, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)
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@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/ocaml/libs/xl/xl.ml
tools/ocaml/libs/xl/xl.mli

index 4bd3f8b20c57430d6ad59f64969f4f331afd32a1..b83053b9064b49a3583f00a770834d645ef18bc0 100644 (file)
 
 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,54 +53,49 @@ module Domain_create_info = struct
        }
 end
 
-module Domain_build_info = struct
-       module Hvm = struct
-               type t =
-               {
-                       pae : bool;
-                       apic : bool;
-                       acpi : bool;
-                       nx : bool;
-                       viridian : bool;
-                       timeoffset : string;
-                       timer_mode : int;
-                       hpet : int;
-                       vpt_align : int;
-               }
-       end
-
-       module Pv = struct
-               type t =
-               {
-                       slack_memkb : int64;
-                       cmdline : string;
-                       ramdisk : string;
-                       features : string;
-               }
-       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 =
        {
-               max_vcpus : int;
-               cur_vcpus : int;
-               max_memkb : int64;
-               target_memkb : int64;
-               video_memkb : int64;
-               shadow_memkb : int64;
-               kernel : string;
-               u : [ `HVM of Hvm.t | `PV of Pv.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
 
-type domid = int
+module Device_console = struct
+       type t =
+       {
+               backend_domid : domid;
+               devid : int;
+               consoletype : console_type;
+       }
 
-type disk_phystype =
-       | PHYSTYPE_QCOW
-       | PHYSTYPE_QCOW2
-       | PHYSTYPE_VHD
-       | PHYSTYPE_AIO
-       | PHYSTYPE_FILE
-       | PHYSTYPE_PHY
+       external add : t -> domid -> unit = "stub_xl_device_console_add"
+end
 
 module Device_disk = struct
        type t =
@@ -96,10 +113,6 @@ module Device_disk = struct
        external del : t -> domid -> unit = "stub_xl_device_disk_del"
 end
 
-type nic_type =
-       | NICTYPE_IOEMU
-       | NICTYPE_VIF
-
 module Device_nic = struct
        type t =
        {
@@ -117,54 +130,6 @@ module Device_nic = struct
        external del : t -> domid -> unit = "stub_xl_device_nic_del"
 end
 
-type console_type =
-       | CONSOLETYPE_XENCONSOLED
-       | CONSOLETYPE_IOEMU
-
-module Device_console = struct
-       type t =
-       {
-               backend_domid : domid;
-               devid : int;
-               consoletype : console_type;
-       }
-
-       external add : 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 =
        {
@@ -201,16 +166,6 @@ module Physinfo = struct
 
 end
 
-module Topologyinfo = struct
-       type t =
-       {
-               core: int;
-               socket: int;
-               node: int;
-       }
-       external get: unit -> t = "stub_xl_topologyinfo"
-end
-
 module Sched_credit = struct
        type t =
        {
@@ -221,9 +176,54 @@ module Sched_credit = struct
        external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"
 end
 
-type button =
-       | Button_Power
-       | Button_Sleep
+module Domain_build_info = struct
+       module Hvm = struct
+               type t =
+               {
+                       pae : bool;
+                       apic : bool;
+                       acpi : bool;
+                       nx : bool;
+                       viridian : bool;
+                       timeoffset : string;
+                       timer_mode : int;
+                       hpet : int;
+                       vpt_align : int;
+               }
+       end
+
+       module Pv = struct
+               type t =
+               {
+                       slack_memkb : int64;
+                       cmdline : string;
+                       ramdisk : string;
+                       features : string;
+               }
+       end
+
+       type t =
+       {
+               max_vcpus : int;
+               cur_vcpus : int;
+               max_memkb : int64;
+               target_memkb : int64;
+               video_memkb : int64;
+               shadow_memkb : int64;
+               kernel : string;
+               u : [ `HVM of Hvm.t | `PV of Pv.t ];
+       }
+end
+
+module Topologyinfo = struct
+       type t =
+       {
+               core: int;
+               socket: int;
+               node: int;
+       }
+       external get: unit -> t = "stub_xl_topologyinfo"
+end
 
 external button_press : domid -> button -> unit = "stub_xl_button_press"
 
index 6dc1df8c20d63f68e05eb8c14c30c2f0c664255e..9d86ebee69522235a710a2c1d6da8177238a3687 100644 (file)
 
 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,54 +53,49 @@ module Domain_create_info : sig
        }
 end
 
-module Domain_build_info : sig
-       module Hvm : sig
-               type t =
-               {
-                       pae : bool;
-                       apic : bool;
-                       acpi : bool;
-                       nx : bool;
-                       viridian : bool;
-                       timeoffset : string;
-                       timer_mode : int;
-                       hpet : int;
-                       vpt_align : int;
-               }
-       end
-
-       module Pv : sig
-               type t =
-               {
-                       slack_memkb : int64;
-                       cmdline : string;
-                       ramdisk : string;
-                       features : string;
-               }
-       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 =
        {
-               max_vcpus : int;
-               cur_vcpus : int;
-               max_memkb : int64;
-               target_memkb : int64;
-               video_memkb : int64;
-               shadow_memkb : int64;
-               kernel : string;
-               u : [ `HVM of Hvm.t | `PV of Pv.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
 
-type domid = int
+module Device_console : sig
+       type t =
+       {
+               backend_domid : domid;
+               devid : int;
+               consoletype : console_type;
+       }
 
-type disk_phystype =
-       | PHYSTYPE_QCOW
-       | PHYSTYPE_QCOW2
-       | PHYSTYPE_VHD
-       | PHYSTYPE_AIO
-       | PHYSTYPE_FILE
-       | PHYSTYPE_PHY
+       external add : t -> domid -> unit = "stub_xl_device_console_add"
+end
 
 module Device_disk : sig
        type t =
@@ -96,10 +113,6 @@ module Device_disk : sig
        external del : t -> domid -> unit = "stub_xl_device_disk_del"
 end
 
-type nic_type =
-       | NICTYPE_IOEMU
-       | NICTYPE_VIF
-
 module Device_nic : sig
        type t =
        {
@@ -117,54 +130,6 @@ module Device_nic : sig
        external del : t -> domid -> unit = "stub_xl_device_nic_del"
 end
 
-type console_type =
-       | CONSOLETYPE_XENCONSOLED
-       | CONSOLETYPE_IOEMU
-
-module Device_console : sig
-       type t =
-       {
-               backend_domid : domid;
-               devid : int;
-               consoletype : console_type;
-       }
-
-       external add : 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 =
        {
@@ -201,16 +166,6 @@ module Physinfo : sig
 
 end
 
-module Topologyinfo : sig
-       type t =
-       {
-               core: int;
-               socket: int;
-               node: int;
-       }
-       external get : unit -> t = "stub_xl_topologyinfo"
-end
-
 module Sched_credit : sig
        type t =
        {
@@ -222,9 +177,54 @@ module Sched_credit : sig
        external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"
 end
 
-type button =
-       | Button_Power
-       | Button_Sleep
+module Domain_build_info : sig
+       module Hvm : sig
+               type t =
+               {
+                       pae : bool;
+                       apic : bool;
+                       acpi : bool;
+                       nx : bool;
+                       viridian : bool;
+                       timeoffset : string;
+                       timer_mode : int;
+                       hpet : int;
+                       vpt_align : int;
+               }
+       end
+
+       module Pv : sig
+               type t =
+               {
+                       slack_memkb : int64;
+                       cmdline : string;
+                       ramdisk : string;
+                       features : string;
+               }
+       end
+
+       type t =
+       {
+               max_vcpus : int;
+               cur_vcpus : int;
+               max_memkb : int64;
+               target_memkb : int64;
+               video_memkb : int64;
+               shadow_memkb : int64;
+               kernel : string;
+               u : [ `HVM of Hvm.t | `PV of Pv.t ];
+       }
+end
+
+module Topologyinfo : sig
+       type t =
+       {
+               core: int;
+               socket: int;
+               node: int;
+       }
+       external get : unit -> t = "stub_xl_topologyinfo"
+end
 
 external button_press : domid -> button -> unit = "stub_xl_button_press"