[libvirt] [PATCH 03/11] remote: don't pull anonymous enums into rpc protocol structs

Daniel P. Berrangé berrange at redhat.com
Fri Sep 27 17:17:25 UTC 2019


The VIR_TYPED_PARAM_* enum fields are defined in libvirt-common.h, not
in the remote protcol, so shouldn't be part of the protocol structs
output check. This avoids similar problems hitting when we add use of
glib, which has other such anonymous enums.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 src/Makefile.am             | 3 +--
 src/admin_protocol-structs  | 9 ---------
 src/remote_protocol-structs | 9 ---------
 3 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 66ba710e50..9d21395892 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -241,8 +241,7 @@ PDWTAGS = \
 	  else \
 	    $(PERL) -0777 -n \
 		-e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \
-		-e '  if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \
-		-e '      $$p =~ /^enum \{/) {' \
+		-e '  if ($$p =~ /^(struct|enum) $(struct_prefix)/) {' \
 		-e '    $$p =~ s!\t*/\*.*?\*/!!sg;' \
 		-e '    $$p =~ s!\s+\n!\n!sg;' \
 		-e '    $$p =~ s!\s+$$!!;' \
diff --git a/src/admin_protocol-structs b/src/admin_protocol-structs
index a6c53807ee..983e6e5292 100644
--- a/src/admin_protocol-structs
+++ b/src/admin_protocol-structs
@@ -1,13 +1,4 @@
 /* -*- c -*- */
-enum {
-        VIR_TYPED_PARAM_INT = 1,
-        VIR_TYPED_PARAM_UINT = 2,
-        VIR_TYPED_PARAM_LLONG = 3,
-        VIR_TYPED_PARAM_ULLONG = 4,
-        VIR_TYPED_PARAM_DOUBLE = 5,
-        VIR_TYPED_PARAM_BOOLEAN = 6,
-        VIR_TYPED_PARAM_STRING = 7,
-};
 struct admin_typed_param_value {
         int                        type;
         union {
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index eb689b3574..51606e7473 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -1,13 +1,4 @@
 /* -*- c -*- */
-enum {
-        VIR_TYPED_PARAM_INT = 1,
-        VIR_TYPED_PARAM_UINT = 2,
-        VIR_TYPED_PARAM_LLONG = 3,
-        VIR_TYPED_PARAM_ULLONG = 4,
-        VIR_TYPED_PARAM_DOUBLE = 5,
-        VIR_TYPED_PARAM_BOOLEAN = 6,
-        VIR_TYPED_PARAM_STRING = 7,
-};
 struct remote_nonnull_domain {
         remote_nonnull_string      name;
         remote_uuid                uuid;
-- 
2.21.0




More information about the libvir-list mailing list