summaryrefslogtreecommitdiff
path: root/src/rpc/gendispatch.pl
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2016-03-09 13:32:55 +0100
committerMartin Kletzander <mkletzan@redhat.com>2016-03-11 12:58:41 +0100
commit5b7d09804c22991fd860e3346e10cdcefb39b7d3 (patch)
tree5e927891caa236a2448d4b5621726950425ec0f2 /src/rpc/gendispatch.pl
parent576c54f9b17b36f66ab9d1561984eb30821fe1c0 (diff)
downloadlibvirt-5b7d09804c22991fd860e3346e10cdcefb39b7d3.tar.gz
gendispatch: Support modern listing of more types
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Diffstat (limited to 'src/rpc/gendispatch.pl')
-rwxr-xr-xsrc/rpc/gendispatch.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index c66efe8c40..6c3ded4a1e 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -649,7 +649,7 @@ elsif ($mode eq "server") {
if (!$modern_ret_as_list) {
push(@ret_list, "ret->$3 = tmp.$3;");
}
- } elsif ($ret_member =~ m/admin_nonnull_(server) (\S+)<(\S+)>;/) {
+ } elsif ($ret_member =~ m/(?:admin|remote)_nonnull_(secret|nwfilter|node_device|interface|network|storage_vol|storage_pool|domain_snapshot|domain|server) (\S+)<(\S+)>;/) {
$modern_ret_struct_name = $1;
$single_ret_list_error_msg_type = $1;
$single_ret_list_name = $2;
@@ -1401,7 +1401,7 @@ elsif ($mode eq "client") {
}
push(@ret_list, "memcpy(result->$3, ret.$3, sizeof(result->$3));");
- } elsif ($ret_member =~ m/admin_nonnull_(server) (\S+)<(\S+)>;/) {
+ } elsif ($ret_member =~ m/(?:admin|remote)_nonnull_(secret|nwfilter|node_device|interface|network|storage_vol|storage_pool|domain_snapshot|domain|server) (\S+)<(\S+)>;/) {
my $proc_name = name_to_TypeName($1);
if ($structprefix eq "admin") {
@@ -1730,12 +1730,13 @@ elsif ($mode eq "client") {
$callflags = "REMOTE_CALL_LXC";
}
+ my $call_priv = $priv_src;
if ($structprefix ne "admin") {
- $priv_src = "$priv_src, priv";
+ $call_priv = "$call_priv, priv";
}
print "\n";
- print " if (call($priv_src, $callflags, $call->{constname},\n";
+ print " if (call($call_priv, $callflags, $call->{constname},\n";
print " (xdrproc_t)xdr_$argtype, (char *)$call_args,\n";
print " (xdrproc_t)xdr_$rettype, (char *)$call_ret) == -1) {\n";
@@ -1778,6 +1779,9 @@ elsif ($mode eq "client") {
print " }\n";
print "\n";
} elsif ($modern_ret_as_list) {
+ if ($modern_ret_struct_name eq "domain_snapshot") {
+ $priv_src =~ s/->conn//;
+ }
print " if (result) {\n";
print " if (VIR_ALLOC_N(tmp_results, ret.$single_ret_list_name.${single_ret_list_name}_len + 1) < 0)\n";
print " goto cleanup;\n";