mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
tmem/xc_tmem_control: Rename 'arg1' to 'len' and 'arg2' to arg.
That is what they are used for. Lets make it more clear. Of all the various sub-commands, the only one that needed semantic change is XEN_SYSCTL_TMEM_OP_SAVE_BEGIN. That in the past used 'arg1', and now we are moving it to use 'arg'. Since that code is only used during migration which is tied to the toolstack it is OK to change it. We should increment the XEN_SYSCTL_INTERFACE_VERSION because of this, and that was fortunatly done in the patch titled: "tmem/libxc: Squash XEN_SYSCTL_TMEM_OP_[SET|SAVE].." While at it, also fix xc_tmem_control_oid to properly handle the 'buf' and bounce it as appropiate. Acked-by: Andrew cooper <andrew.cooper3@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
1 parent
4ca5e0103d
commit
c146975553
7 files changed
+44
-45
No files matched your search
@@ -1612,8 +1612,8 @@ static PyObject *pyxc_tmem_control(XcObject *self,
|
||||
int32_t pool_id;
|
||||
uint32_t subop;
|
||||
uint32_t cli_id;
|
||||
uint32_t arg1;
|
||||
uint32_t arg2;
|
||||
uint32_t len;
|
||||
uint32_t arg;
|
||||
char *buf;
|
||||
char _buffer[32768], *buffer = _buffer;
|
||||
int rc;
|
||||
@@ -1621,13 +1621,13 @@ static PyObject *pyxc_tmem_control(XcObject *self,
|
||||
static char *kwd_list[] = { "pool_id", "subop", "cli_id", "arg1", "arg2", "buf", NULL };
|
||||
|
||||
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiiis", kwd_list,
|
||||
&pool_id, &subop, &cli_id, &arg1, &arg2, &buf) )
|
||||
&pool_id, &subop, &cli_id, &len, &arg, &buf) )
|
||||
return NULL;
|
||||
|
||||
if ( (subop == XEN_SYSCTL_TMEM_OP_LIST) && (arg1 > 32768) )
|
||||
arg1 = 32768;
|
||||
if ( (subop == XEN_SYSCTL_TMEM_OP_LIST) && (len > 32768) )
|
||||
len = 32768;
|
||||
|
||||
if ( (rc = xc_tmem_control(self->xc_handle, pool_id, subop, cli_id, arg1, arg2, buffer)) < 0 )
|
||||
if ( (rc = xc_tmem_control(self->xc_handle, pool_id, subop, cli_id, len, arg, buffer)) < 0 )
|
||||
return Py_BuildValue("i", rc);
|
||||
|
||||
switch (subop) {
|
||||
@@ -2506,8 +2506,8 @@ static PyMethodDef pyxc_methods[] = {
|
||||
" pool_id [int]: Identifier of the tmem pool (-1 == all).\n"
|
||||
" subop [int]: Supplementary Operation.\n"
|
||||
" cli_id [int]: Client identifier (-1 == all).\n"
|
||||
" arg1 [int]: Argument.\n"
|
||||
" arg2 [int]: Argument.\n"
|
||||
" len [int]: Length of 'buf'.\n"
|
||||
" arg [int]: Argument.\n"
|
||||
" buf [str]: Buffer.\n\n"
|
||||
"Returns: [int] 0 or [str] tmem info on success; exception on error.\n" },
|
||||
|
||||
|
||||