From: Keir Fraser Date: Mon, 7 Jun 2010 05:56:04 +0000 (+0100) Subject: xl: make mem-set and mem-max to use MB for memory unit by default. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12012 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2495a965a0724b4972ab86c6f6049e40c5f8690f;p=xen.git xl: make mem-set and mem-max to use MB for memory unit by default. Signed-off-by: Zhigang Wang --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index fd029be642..dbdfb83c05 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1239,9 +1239,9 @@ static int64_t parse_mem_size_kb(char *mem) kbytes <<= 10; case 'g': kbytes <<= 10; + case '\0': case 'm': kbytes <<= 10; - case '\0': case 'k': break; case 'b': @@ -1302,7 +1302,6 @@ int main_memmax(int argc, char **argv) exit(1); } - printf("setting domid %d static max memory to : %s\n", domid, mem); exit(0); } @@ -1318,7 +1317,6 @@ void set_memory_target(char *p, char *mem) exit(3); } - printf("setting domid %d memory to : %lld\n", domid, memorykb); libxl_set_memory_target(&ctx, domid, memorykb, /* enforce */ 1); } diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c index 2ea0e66a94..c488095635 100644 --- a/tools/libxl/xl_cmdtable.c +++ b/tools/libxl/xl_cmdtable.c @@ -121,12 +121,12 @@ struct cmd_spec cmd_table[] = { { "mem-max", &main_memmax, "Set the maximum amount reservation for a domain", - " ", + " ", }, { "mem-set", &main_memset, "Set the current memory usage for a domain", - " ", + " ", }, { "button-press", &main_button_press,