ia64/xen-unstable

changeset 6997:3fbefefb54aa

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>
author emellor@ewan
date Tue Sep 20 17:29:57 2005 +0100 (2005-09-20)
parents 6d13fd586338
children a35c20d53947
files tools/python/xen/lowlevel/xc/xc.c
line diff
     1.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Tue Sep 20 17:25:27 2005 +0100
     1.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Tue Sep 20 17:29:57 2005 +0100
     1.3 @@ -847,7 +847,7 @@ static PyObject *pyxc_domain_setmaxmem(P
     1.4      XcObject *xc = (XcObject *)self;
     1.5  
     1.6      u32 dom;
     1.7 -    unsigned long maxmem_kb;
     1.8 +    unsigned int maxmem_kb;
     1.9  
    1.10      static char *kwd_list[] = { "dom", "maxmem_kb", NULL };
    1.11  
    1.12 @@ -1178,7 +1178,7 @@ static PyMethodDef pyxc_methods[] = {
    1.13        METH_VARARGS | METH_KEYWORDS, "\n"
    1.14        "Set a domain's memory limit\n"
    1.15        " dom [int]: Identifier of domain.\n"
    1.16 -      " maxmem_kb [long]: .\n"
    1.17 +      " maxmem_kb [int]: .\n"
    1.18        "Returns: [int] 0 on success; -1 on error.\n" },
    1.19  
    1.20      { "domain_memory_increase_reservation",