mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
domain_setmaxmem takes an int, not a long, for the maxmem_kb parameter. The
underlying xc_domain_setmaxmem already took an unsigned int, and PyArg_ParseTupleAndKeywords call was only parsing an int, so there is no way that longer values would get through here in any case. Fixing the documentation and the local variable is the best solution, until someone decides that we need to support maxmem values greater than 2TiB. Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
2a9831d0a8
commit
5a9ab7acc1
1 file changed
+2
-2
@@ -847,7 +847,7 @@ static PyObject *pyxc_domain_setmaxmem(PyObject *self,
|
||||
XcObject *xc = (XcObject *)self;
|
||||
|
||||
u32 dom;
|
||||
unsigned long maxmem_kb;
|
||||
unsigned int maxmem_kb;
|
||||
|
||||
static char *kwd_list[] = { "dom", "maxmem_kb", NULL };
|
||||
|
||||
@@ -1178,7 +1178,7 @@ static PyMethodDef pyxc_methods[] = {
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
"Set a domain's memory limit\n"
|
||||
" dom [int]: Identifier of domain.\n"
|
||||
" maxmem_kb [long]: .\n"
|
||||
" maxmem_kb [int]: .\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "domain_memory_increase_reservation",
|
||||
|
||||