]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote: don't pull anonymous enums into rpc protocol structs
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 17 Sep 2019 11:24:25 +0000 (12:24 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 1 Oct 2019 13:27:15 +0000 (14:27 +0100)
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.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/Makefile.am
src/admin_protocol-structs
src/remote_protocol-structs

index cd955ee5525a3815ce8094ebd8dd24e20793582b..bd03b09cb2b8be88672faaa9cbabafcc04cd1c6c 100644 (file)
@@ -240,8 +240,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+$$!!;' \
index a6c53807ee9893f79801d72c968a1a7b73007136..983e6e5292dbda8dcb80edb41fbf5bb0c172b1e0 100644 (file)
@@ -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 {
index eb689b357405e0a33590ebcdbc2d806c27d3503f..51606e7473daee6586eb3af6946f82a53ab493f1 100644 (file)
@@ -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;