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

[Xen-changelog] [xen master] libxl: idl: complete some enums in the IDL with their defaults



commit 166bb0fe37f3b49c4825c4dce1e33251c9b7c784
Author:     Rob Hoes <rob.hoes@xxxxxxxxxx>
AuthorDate: Thu Aug 22 11:50:52 2013 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Sep 10 11:44:02 2013 +0100

    libxl: idl: complete some enums in the IDL with their defaults
    
    There are several enums in the IDL that are initialised to 0, while
    the value 0 is not part of the enum itself. This creates problems for
    language bindings generated from the IDL, such as the OCaml ones.
    
    Added an explicit (0, "UNKNOWN") enum value where appropriate, or used
    init_val to default to a sensible value.
    
    Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_types.idl |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index ebbeb66..10f95f4 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -32,14 +32,16 @@ libxl_domain_type = Enumeration("domain_type", [
     (-1, "INVALID"),
     (1, "HVM"),
     (2, "PV"),
-    ])
+    ], init_val = -1)
 
 libxl_device_model_version = Enumeration("device_model_version", [
+    (0, "UNKNOWN"),
     (1, "QEMU_XEN_TRADITIONAL"), # Historical qemu-xen device model (qemu-dm)
     (2, "QEMU_XEN"),             # Upstream based qemu-xen device model
     ])
 
 libxl_console_type = Enumeration("console_type", [
+    (0, "UNKNOWN"),
     (1, "SERIAL"),
     (2, "PV"),
     ])
@@ -61,6 +63,7 @@ libxl_disk_backend = Enumeration("disk_backend", [
     ])
 
 libxl_nic_type = Enumeration("nic_type", [
+    (0, "UNKNOWN"),
     (1, "VIF_IOEMU"),
     (2, "VIF"),
     ])
@@ -75,7 +78,7 @@ libxl_action_on_shutdown = Enumeration("action_on_shutdown", [
 
     (5, "COREDUMP_DESTROY"),
     (6, "COREDUMP_RESTART"),
-    ])
+    ], init_val = 1)
 
 libxl_trigger = Enumeration("trigger", [
     (0, "UNKNOWN"),
@@ -96,6 +99,7 @@ libxl_tsc_mode = Enumeration("tsc_mode", [
 
 # Consistent with the values defined for HVM_PARAM_TIMER_MODE.
 libxl_timer_mode = Enumeration("timer_mode", [
+    (-1, "unknown"),
     (0, "delay_for_missed_ticks"),
     (1, "no_delay_for_missed_ticks"),
     (2, "no_missed_ticks_pending"),
@@ -103,6 +107,7 @@ libxl_timer_mode = Enumeration("timer_mode", [
     ], init_val = "LIBXL_TIMER_MODE_DEFAULT")
 
 libxl_bios_type = Enumeration("bios_type", [
+    (0, "unknown"),
     (1, "rombios"),
     (2, "seabios"),
     (3, "ovmf"),
@@ -131,7 +136,7 @@ libxl_shutdown_reason = Enumeration("shutdown_reason", [
 libxl_vga_interface_type = Enumeration("vga_interface_type", [
     (1, "CIRRUS"),
     (2, "STD"),
-    ], init_val = 0)
+    ], init_val = 1)
 
 libxl_vendor_device = Enumeration("vendor_device", [
     (0, "NONE"),
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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