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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 28 of 32] tools: ocaml: reorder xl bindings type and function definitions to match IDL
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 18 Apr 2011 14:53:50 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Mon, 18 Apr 2011 07:30:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1303134802@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.1303134802@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1303134450 -3600
# Node ID 009009ca09d851d17fddf4a5a559112f574ace05
# Parent  ef338657cc33a0b3b7103be4a3788dac0a7eab88
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 ef338657cc33 -r 009009ca09d8 tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Mon Apr 18 14:47:06 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Mon Apr 18 14:47:30 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,129 @@ 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_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_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 =
@@ -70,137 +215,6 @@ module Domain_build_info = 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 =
-       {
-               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 =
-       {
-               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 =
        {
@@ -211,20 +225,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 ef338657cc33 -r 009009ca09d8 tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli        Mon Apr 18 14:47:06 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.mli        Mon Apr 18 14:47:30 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,130 @@ 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_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_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 =
@@ -70,137 +216,6 @@ module Domain_build_info : 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 =
-       {
-               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 =
-       {
-               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 =
        {
@@ -211,21 +226,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>