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 27 of 32] tools: libxl: reduce number of integer type

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 27 of 32] tools: libxl: reduce number of integer types in the IDL
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Wed, 20 Apr 2011 17:15:46 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Wed, 20 Apr 2011 09:47:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1303316119@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.1303316119@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1303315987 -3600
# Node ID b142d87fd70402aeaf10c860bbb44339e2eafde2
# Parent  3c08d944bc2485f99b16c4e923e2731307cfa623
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>

diff -r 3c08d944bc24 -r b142d87fd704 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 @@ Several standard types a predefined. The
 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 3c08d944bc24 -r b142d87fd704 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 @@ 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_inf
     ("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
     ("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
     ("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),
     ])
diff -r 3c08d944bc24 -r b142d87fd704 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 @@ 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)
diff -r 3c08d944bc24 -r b142d87fd704 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 @@ 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);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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