mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
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:
parent
4166856c23
commit
945648d36a
@ -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
|
static int
|
||||||
remoteDispatchNetworkPortGetParameters(virNetServerPtr server G_GNUC_UNUSED,
|
remoteDispatchNetworkPortGetParameters(virNetServerPtr server G_GNUC_UNUSED,
|
||||||
virNetServerClientPtr client,
|
virNetServerClientPtr client,
|
||||||
|
@ -6367,7 +6367,7 @@ enum remote_procedure {
|
|||||||
REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE = 377,
|
REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE = 377,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @generate: none
|
* @generate: server
|
||||||
* @priority: high
|
* @priority: high
|
||||||
* @acl: storage_vol:read
|
* @acl: storage_vol:read
|
||||||
*/
|
*/
|
||||||
|
@ -994,6 +994,7 @@ elsif ($mode eq "server") {
|
|||||||
} else {
|
} else {
|
||||||
my $struct_name = $call->{ProcName};
|
my $struct_name = $call->{ProcName};
|
||||||
$struct_name =~ s/Get//;
|
$struct_name =~ s/Get//;
|
||||||
|
$struct_name =~ s/Flags$//;
|
||||||
|
|
||||||
splice(@args_list, $call->{ret_offset}, 0, ("&tmp"));
|
splice(@args_list, $call->{ret_offset}, 0, ("&tmp"));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user