]> xenbits.xensource.com Git - xen.git/commitdiff
tools: libxl: reduce number of integer types in the 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)
Remove unsigned_interger, unsigned and unsigned_long in favour of the
uintX types.

Retain the integer type as a 24 bit signed integer. This will benefit
language bindings for higher-level languages which don't support the
full machine int size.

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/libxl/idl.txt
tools/libxl/libxl.idl
tools/libxl/libxltypes.py
tools/libxl/xl_cmdimpl.c

index a1a3125cc4c6abd85f1912fd626dc9f58d748a96..dad59ac50c859f5cfe399c5c365582394253ad4a 100644 (file)
@@ -143,10 +143,7 @@ Several standard types a predefined. They are
 void                   (void pointer type)
 bool
 size_t
-integer                        (C int type)
-unsigned_integer       (C unsigned int type) 
-unsigned               (C unsigned int type) 
-unsigned_long          (C unsigned long type)
+integer                        24 bit signed integer.
 
 uint{8,16,32,64}       uint{8,16,32,64}_t
 
index 17525a97ec6cb694bacb3b164485e2e9d159549f..a5be66ff42774e4179904ba744f73d48c69c2a20 100644 (file)
@@ -95,7 +95,7 @@ libxl_dominfo = Struct("dominfo",[
     ("shutdown",    bool),
     ("dying",       bool),
     
-    ("shutdown_reason", unsigned, False, 
+    ("shutdown_reason", uint8, False, 
 """Valid SHUTDOWN_* value from xen/sched.h iff (shutdown||dying).
 
 Otherwise set to a value guaranteed not to clash with any valid
@@ -129,8 +129,8 @@ libxl_version_info = Struct("version_info", [
     ("compile_date",      string),
     ("capabilities",      string),
     ("changeset",         string),
-    ("virt_start",        unsigned_long),
-    ("pagesize",          unsigned_long),
+    ("virt_start",        uint64),
+    ("pagesize",          integer),
     ("commandline",       string),
     ])
                                              
@@ -157,7 +157,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
     ("shadow_memkb",    uint32),
     ("disable_migrate", bool),
     ("cpuid",           libxl_cpuid_policy_list),
-    ("hvm",             integer),
+    ("hvm",             bool),
     ("u", KeyedUnion(None, "hvm",
                 [("hvm", "%s", Struct(None,
                                        [("hvmloader", string),
@@ -220,7 +220,7 @@ libxl_device_model_info = Struct("device_model_info",[
     ("apic",             bool,              False, "apic enabled or disabled"),
     ("vcpus",            integer,           False, "max number of vcpus"),
     ("vcpu_avail",       integer,           False, "vcpus actually available"),
-    ("xen_platform_pci", integer,           False, "enable/disable the xen platform pci device"),
+    ("xen_platform_pci", bool,              False, "enable/disable the xen platform pci device"),
     ("extra",            libxl_string_list, False, "extra parameters pass directly to qemu, NULL terminated"),
     ],
     comment=
@@ -283,9 +283,9 @@ libxl_device_pci = Struct("device_pci", [
     ("func",      uint8),
     ("dev",       uint8),
     ("bus",       uint8),
-    ("domain", unsigned_integer),
-    ("vdevfn", unsigned_integer),
-    ("vfunc_mask", unsigned_integer),
+    ("domain",    integer),
+    ("vdevfn",    uint32),
+    ("vfunc_mask", uint32),
     ("msitranslate", bool),
     ("power_mgmt", bool),
     ])
index 0c85d79879030813f3a8d510167d23b14814ab75..87605d81fdae4e2646b17ee553a330a58d7f5fbd 100644 (file)
@@ -162,9 +162,6 @@ bool = Builtin("bool", namespace = None)
 size_t = Number("size_t", namespace = None)
 
 integer = Number("int", namespace = None, signed = True)
-unsigned_integer = Number("unsigned int", namespace = None)
-unsigned = Number("unsigned int", namespace = None)
-unsigned_long = Number("unsigned long", namespace = None)
 
 uint8 = UInt(8)
 uint16 = UInt(16)
index 48d89f97e3ecb292ef142f25ba117192ac10f109..15e21f2d51d07767500bf3385129315e7b991427 100644 (file)
@@ -3699,8 +3699,8 @@ static void output_xeninfo(void)
     printf("xen_extra              : %s\n", info->xen_version_extra);
     printf("xen_caps               : %s\n", info->capabilities);
     printf("xen_scheduler          : %s\n", libxl_schedid_to_name(ctx, sched_id));
-    printf("xen_pagesize           : %lu\n", info->pagesize);
-    printf("platform_params        : virt_start=0x%lx\n", info->virt_start);
+    printf("xen_pagesize           : %u\n", info->pagesize);
+    printf("platform_params        : virt_start=0x%"PRIx64"\n", info->virt_start);
     printf("xen_changeset          : %s\n", info->changeset);
     printf("xen_commandline        : %s\n", info->commandline);
     printf("cc_compiler            : %s\n", info->compiler);