From 945648d36af6aaf0c9332f8623950a398e399305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Sat, 1 Feb 2020 13:38:19 +0100 Subject: [PATCH] rpc: gendispatch: trim Flags from the return struct name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This lets it generate the remote dispatch for StorageVolGetInfoFlags. Signed-off-by: Ján Tomko Reviewed-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 35 ----------------------------- src/remote/remote_protocol.x | 2 +- src/rpc/gendispatch.pl | 1 + 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index b08bd5b8ba..2741a32f63 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -7162,41 +7162,6 @@ remoteDispatchDomainInterfaceAddresses(virNetServerPtr server G_GNUC_UNUSED, } -static int -remoteDispatchStorageVolGetInfoFlags(virNetServerPtr server G_GNUC_UNUSED, - virNetServerClientPtr client, - virNetMessagePtr msg G_GNUC_UNUSED, - virNetMessageErrorPtr rerr, - remote_storage_vol_get_info_flags_args *args, - remote_storage_vol_get_info_flags_ret *ret) -{ - int rv = -1; - virStorageVolPtr vol = NULL; - virStorageVolInfo tmp; - virConnectPtr conn = remoteGetStorageConn(client); - - if (!conn) - goto cleanup; - - if (!(vol = get_nonnull_storage_vol(conn, args->vol))) - goto cleanup; - - if (virStorageVolGetInfoFlags(vol, &tmp, args->flags) < 0) - goto cleanup; - - ret->type = tmp.type; - ret->capacity = tmp.capacity; - ret->allocation = tmp.allocation; - rv = 0; - - cleanup: - if (rv < 0) - virNetMessageSaveError(rerr); - virObjectUnref(vol); - return rv; -} - - static int remoteDispatchNetworkPortGetParameters(virNetServerPtr server G_GNUC_UNUSED, virNetServerClientPtr client, diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 1f7963510a..d4393680e9 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -6367,7 +6367,7 @@ enum remote_procedure { REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE = 377, /** - * @generate: none + * @generate: server * @priority: high * @acl: storage_vol:read */ diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 8656c8f205..987a136566 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -994,6 +994,7 @@ elsif ($mode eq "server") { } else { my $struct_name = $call->{ProcName}; $struct_name =~ s/Get//; + $struct_name =~ s/Flags$//; splice(@args_list, $call->{ret_offset}, 0, ("&tmp")); -- GitLab