On Tue, 2015-12-01 at 11:53 +0000, George Dunlap wrote:
> Bring set_memory_target into line with set_memory_max (which does
> return an error code.
> 
> Signed-off-by: George Dunlap <george.dun...@eu.citrix.com>
> ---
> CC: Ian Campbell <ian.campb...@citrix.com>
> CC: Ian Jackson <ian.jack...@citrix.com>
> CC: Wei Liu <wei.l...@citrix.com>
> CC: Konrad Wilk <konrad.w...@oracle.com>
> ---
>  tools/libxl/xl_cmdimpl.c | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 2ba2393..4455d73 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -3297,9 +3297,10 @@ int main_memmax(int argc, char **argv)
>      return 0;
>  }
>  
> -static void set_memory_target(uint32_t domid, const char *mem)
> +static int set_memory_target(uint32_t domid, const char *mem)
>  {
> -    long long int memorykb;
> +    int64_t memorykb;

The switch from long long to int64_t here is just incidental, right?

It did cause me to notice that both libxl_set_memory_target
and libxl_domain_setmaxmem take a 32bit (inconsistently signed vs unsigned)
argument for the memkb, so apart from the loss of range vs
parse_mem_size_kb you also can't set the target as high as you can set the
maximum. Nice.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to