rpc: gendispatch: trim Flags from the return struct name

This lets it generate the remote dispatch for StorageVolGetInfoFlags.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Ján Tomko 2020-02-01 13:38:19 +01:00
parent 4166856c23
commit 945648d36a
3 changed files with 2 additions and 36 deletions

View File

@ -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,

View File

@ -6367,7 +6367,7 @@ enum remote_procedure {
REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE = 377,
/**
* @generate: none
* @generate: server
* @priority: high
* @acl: storage_vol:read
*/

View File

@ -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"));