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 20 of 24] tools: ocaml: reorder xl bindings type and

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 20 of 24] tools: ocaml: reorder xl bindings type and function definitions to match IDL
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Wed, 13 Apr 2011 15:37:01 +0100
Cc: Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>, Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Delivery-date: Wed, 13 Apr 2011 08:04:55 -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 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

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