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

[libvirt] [PATCH 3/5] remote generator: Unify unsigned int notation in .x files



Rename u_int and unsigned to unsigned int. This gets rid of some special
case code in the generator.
---
 daemon/remote_generator.pl   |   10 +++---
 src/remote/remote_protocol.x |   72 +++++++++++++++++++++---------------------
 2 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
index 8d62c37..e6a0e2c 100755
--- a/daemon/remote_generator.pl
+++ b/daemon/remote_generator.pl
@@ -878,13 +878,13 @@ elsif ($opt_k) {
                     push(@setters_list, "args.$1.${1}_val = (char *)$1;");
                     push(@setters_list, "args.$1.${1}_len = ${1}len;");
                     push(@args_check_list, { name => "\"$1\"", arg => "${1}len", limit => $2 });
-                } elsif ($args_member =~ m/^(.*) (\S+);/) {
-                    my $type_name = $1;
-                    my $arg_name = $2;
+                } elsif ($args_member =~ m/^(unsigned )?(int|hyper) (\S+);/) {
+                    my $type_name;
+                    my $arg_name = $3;
 
+                    $type_name = $1 if ($1);
+                    $type_name .= $2;
                     $type_name =~ s/hyper/long/;
-                    $type_name =~ s/^unsigned$/unsigned int/;
-                    $type_name =~ s/u_int/unsigned int/;
 
                     if ($type_name eq "int") {
                         # fix bad decisions in the xdr protocol
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 7f9a30c..c0fbb8b 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -541,8 +541,8 @@ struct remote_domain_interface_stats_ret {
 
 struct remote_domain_memory_stats_args {
     remote_nonnull_domain dom;
-    u_int maxStats;
-    u_int flags;
+    unsigned int maxStats;
+    unsigned int flags;
 };
 
 struct remote_domain_memory_stat {
@@ -558,8 +558,8 @@ struct remote_domain_block_peek_args {
     remote_nonnull_domain dom;
     remote_nonnull_string path;
     unsigned hyper offset;
-    unsigned size;
-    unsigned flags;
+    unsigned int size;
+    unsigned int flags;
 };
 
 struct remote_domain_block_peek_ret {
@@ -569,8 +569,8 @@ struct remote_domain_block_peek_ret {
 struct remote_domain_memory_peek_args {
     remote_nonnull_domain dom;
     unsigned hyper offset;
-    unsigned size;
-    unsigned flags;
+    unsigned int size;
+    unsigned int flags;
 };
 
 struct remote_domain_memory_peek_ret {
@@ -580,7 +580,7 @@ struct remote_domain_memory_peek_ret {
 struct remote_domain_get_block_info_args {
     remote_nonnull_domain dom;
     remote_nonnull_string path;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_domain_get_block_info_ret {
@@ -1212,7 +1212,7 @@ struct remote_list_defined_storage_pools_ret {
 struct remote_find_storage_pool_sources_args {
     remote_nonnull_string type;
     remote_string srcSpec;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_find_storage_pool_sources_ret {
@@ -1245,7 +1245,7 @@ struct remote_storage_pool_lookup_by_volume_ret {
 
 struct remote_storage_pool_create_xml_args {
     remote_nonnull_string xml;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_pool_create_xml_ret {
@@ -1254,7 +1254,7 @@ struct remote_storage_pool_create_xml_ret {
 
 struct remote_storage_pool_define_xml_args {
     remote_nonnull_string xml;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_pool_define_xml_ret {
@@ -1263,7 +1263,7 @@ struct remote_storage_pool_define_xml_ret {
 
 struct remote_storage_pool_build_args {
     remote_nonnull_storage_pool pool;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_pool_undefine_args {
@@ -1272,7 +1272,7 @@ struct remote_storage_pool_undefine_args {
 
 struct remote_storage_pool_create_args {
     remote_nonnull_storage_pool pool;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_pool_destroy_args {
@@ -1281,17 +1281,17 @@ struct remote_storage_pool_destroy_args {
 
 struct remote_storage_pool_delete_args {
     remote_nonnull_storage_pool pool;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_pool_refresh_args {
     remote_nonnull_storage_pool pool;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_pool_get_xml_desc_args {
     remote_nonnull_storage_pool pool;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_pool_get_xml_desc_ret {
@@ -1371,7 +1371,7 @@ struct remote_storage_vol_lookup_by_path_ret {
 struct remote_storage_vol_create_xml_args {
     remote_nonnull_storage_pool pool;
     remote_nonnull_string xml;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_vol_create_xml_ret {
@@ -1382,7 +1382,7 @@ struct remote_storage_vol_create_xml_from_args {
     remote_nonnull_storage_pool pool;
     remote_nonnull_string xml;
     remote_nonnull_storage_vol clonevol;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_vol_create_xml_from_ret {
@@ -1391,17 +1391,17 @@ struct remote_storage_vol_create_xml_from_ret {
 
 struct remote_storage_vol_delete_args {
     remote_nonnull_storage_vol vol;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_vol_wipe_args {
     remote_nonnull_storage_vol vol;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_vol_get_xml_desc_args {
     remote_nonnull_storage_vol vol;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_storage_vol_get_xml_desc_ret {
@@ -1430,7 +1430,7 @@ struct remote_storage_vol_get_path_ret {
 
 struct remote_node_num_of_devices_args {
     remote_string cap;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_node_num_of_devices_ret {
@@ -1440,7 +1440,7 @@ struct remote_node_num_of_devices_ret {
 struct remote_node_list_devices_args {
     remote_string cap;
     int maxnames;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_node_list_devices_ret {
@@ -1457,7 +1457,7 @@ struct remote_node_device_lookup_by_name_ret {
 
 struct remote_node_device_get_xml_desc_args {
     remote_nonnull_string name;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_node_device_get_xml_desc_ret {
@@ -1539,7 +1539,7 @@ struct remote_domain_event_lifecycle_msg {
 struct remote_domain_xml_from_native_args {
     remote_nonnull_string nativeFormat;
     remote_nonnull_string nativeConfig;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_domain_xml_from_native_ret {
@@ -1550,7 +1550,7 @@ struct remote_domain_xml_from_native_ret {
 struct remote_domain_xml_to_native_args {
     remote_nonnull_string nativeFormat;
     remote_nonnull_string domainXml;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_domain_xml_to_native_ret {
@@ -1580,7 +1580,7 @@ struct remote_secret_lookup_by_uuid_ret {
 
 struct remote_secret_define_xml_args {
     remote_nonnull_string xml;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_secret_define_xml_ret {
@@ -1589,7 +1589,7 @@ struct remote_secret_define_xml_ret {
 
 struct remote_secret_get_xml_desc_args {
     remote_nonnull_secret secret;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_secret_get_xml_desc_ret {
@@ -1599,12 +1599,12 @@ struct remote_secret_get_xml_desc_ret {
 struct remote_secret_set_value_args {
     remote_nonnull_secret secret;
     opaque value<REMOTE_SECRET_VALUE_MAX>;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_secret_get_value_args {
     remote_nonnull_secret secret;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_secret_get_value_ret {
@@ -1707,7 +1707,7 @@ struct remote_interface_is_active_ret {
 
 struct remote_cpu_compare_args {
     remote_nonnull_string xml;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_cpu_compare_ret {
@@ -1717,7 +1717,7 @@ struct remote_cpu_compare_ret {
 
 struct remote_cpu_baseline_args {
     remote_nonnull_string xmlCPUs<REMOTE_CPU_BASELINE_MAX>;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_cpu_baseline_ret {
@@ -1757,13 +1757,13 @@ struct remote_domain_abort_job_args {
 struct remote_domain_migrate_set_max_downtime_args {
     remote_nonnull_domain dom;
     unsigned hyper downtime;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_domain_migrate_set_max_speed_args {
     remote_nonnull_domain dom;
     unsigned hyper bandwidth;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_domain_events_register_any_args {
@@ -1827,12 +1827,12 @@ struct remote_domain_event_graphics_msg {
 
 struct remote_domain_managed_save_args {
     remote_nonnull_domain dom;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_domain_has_managed_save_image_args {
     remote_nonnull_domain dom;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_domain_has_managed_save_image_ret {
@@ -1841,7 +1841,7 @@ struct remote_domain_has_managed_save_image_ret {
 
 struct remote_domain_managed_save_remove_args {
     remote_nonnull_domain dom;
-    unsigned flags;
+    unsigned int flags;
 };
 
 struct remote_domain_snapshot_create_xml_args {
-- 
1.7.0.4


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