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

[Xen-changelog] [xen-unstable] tools: libxl: reduce number of integer types in the IDL



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1303315987 -3600
# Node ID 354696b9212a31418dd7ac6fa0fdbc3871779bc2
# Parent  7c309acc7e3f1a70821ade95560c657663f3d0f4
tools: libxl: reduce number of integer types in the IDL

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@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r 7c309acc7e3f -r 354696b9212a tools/libxl/idl.txt
--- a/tools/libxl/idl.txt       Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/libxl/idl.txt       Wed Apr 20 17:13:07 2011 +0100
@@ -143,10 +143,7 @@
 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
 
diff -r 7c309acc7e3f -r 354696b9212a tools/libxl/libxl.idl
--- a/tools/libxl/libxl.idl     Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/libxl/libxl.idl     Wed Apr 20 17:13:07 2011 +0100
@@ -95,7 +95,7 @@
     ("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 @@
     ("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 @@
     ("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 @@
     ("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 @@
     ("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),
     ])
diff -r 7c309acc7e3f -r 354696b9212a tools/libxl/libxltypes.py
--- a/tools/libxl/libxltypes.py Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/libxl/libxltypes.py Wed Apr 20 17:13:07 2011 +0100
@@ -162,9 +162,6 @@
 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)
diff -r 7c309acc7e3f -r 354696b9212a tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Wed Apr 20 17:13:07 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Wed Apr 20 17:13:07 2011 +0100
@@ -3699,8 +3699,8 @@
     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);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.