mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
remote generator: Rename virNodeGetCellsFreeMemory parameters to common pattern
This allows to remove some special case code from the generator.
This commit is contained in:
parent
a125f82ff4
commit
fc86e6faa0
@ -505,17 +505,16 @@ elsif ($opt_b) {
|
||||
$single_ret_by_ref = 0;
|
||||
$single_ret_as_list = 1;
|
||||
$single_ret_list_name = $1;
|
||||
$single_ret_list_max_var = "max$1";
|
||||
$single_ret_list_max_define = $2;
|
||||
|
||||
my $conn = shift(@args_list);
|
||||
|
||||
if ($call->{ProcName} eq "NodeGetCellsFreeMemory") {
|
||||
$single_ret_check = " <= 0";
|
||||
$single_ret_list_max_var = "maxCells";
|
||||
unshift(@args_list, "(unsigned long long *)ret->$1.$1_val");
|
||||
} else {
|
||||
$single_ret_check = " < 0";
|
||||
$single_ret_list_max_var = "max$1";
|
||||
unshift(@args_list, "ret->$1.$1_val");
|
||||
}
|
||||
|
||||
|
@ -1714,7 +1714,7 @@ remoteNodeGetCellsFreeMemory(virConnectPtr conn,
|
||||
}
|
||||
|
||||
args.startCell = startCell;
|
||||
args.maxCells = maxCells;
|
||||
args.maxcells = maxCells;
|
||||
|
||||
memset (&ret, 0, sizeof ret);
|
||||
if (call (conn, priv, 0, REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY,
|
||||
@ -1722,12 +1722,12 @@ remoteNodeGetCellsFreeMemory(virConnectPtr conn,
|
||||
(xdrproc_t) xdr_remote_node_get_cells_free_memory_ret, (char *)&ret) == -1)
|
||||
goto done;
|
||||
|
||||
for (i = 0 ; i < ret.freeMems.freeMems_len ; i++)
|
||||
freeMems[i] = ret.freeMems.freeMems_val[i];
|
||||
for (i = 0 ; i < ret.cells.cells_len ; i++)
|
||||
freeMems[i] = ret.cells.cells_val[i];
|
||||
|
||||
xdr_free((xdrproc_t) xdr_remote_node_get_cells_free_memory_ret, (char *) &ret);
|
||||
|
||||
rv = ret.freeMems.freeMems_len;
|
||||
rv = ret.cells.cells_len;
|
||||
|
||||
done:
|
||||
remoteDriverUnlock(priv);
|
||||
|
@ -442,11 +442,11 @@ struct remote_get_capabilities_ret {
|
||||
|
||||
struct remote_node_get_cells_free_memory_args {
|
||||
int startCell;
|
||||
int maxCells;
|
||||
int maxcells;
|
||||
};
|
||||
|
||||
struct remote_node_get_cells_free_memory_ret {
|
||||
hyper freeMems<REMOTE_NODE_MAX_CELLS>;
|
||||
hyper cells<REMOTE_NODE_MAX_CELLS>;
|
||||
};
|
||||
|
||||
struct remote_node_get_free_memory_ret {
|
||||
|
@ -153,13 +153,13 @@ struct remote_get_capabilities_ret {
|
||||
};
|
||||
struct remote_node_get_cells_free_memory_args {
|
||||
int startCell;
|
||||
int maxCells;
|
||||
int maxcells;
|
||||
};
|
||||
struct remote_node_get_cells_free_memory_ret {
|
||||
struct {
|
||||
u_int freeMems_len;
|
||||
int64_t * freeMems_val;
|
||||
} freeMems;
|
||||
u_int cells_len;
|
||||
int64_t * cells_val;
|
||||
} cells;
|
||||
};
|
||||
struct remote_node_get_free_memory_ret {
|
||||
int64_t freeMem;
|
||||
|
Loading…
Reference in New Issue
Block a user