]> xenbits.xensource.com Git - xen.git/commitdiff
xl: make mem-set and mem-max to use MB for memory unit by default.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 7 Jun 2010 05:56:04 +0000 (06:56 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 7 Jun 2010 05:56:04 +0000 (06:56 +0100)
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
tools/libxl/xl_cmdimpl.c
tools/libxl/xl_cmdtable.c

index fd029be6425d95ee59db367ed544090af89d1c40..dbdfb83c0584499f5f9a81d3a4ffc74b045bfd3e 100644 (file)
@@ -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);
 }
 
index 2ea0e66a94f8fa71a32c00eef7e3813632e5c9b5..c4880956350964d5caf8a79ec7114824f855c3d2 100644 (file)
@@ -121,12 +121,12 @@ struct cmd_spec cmd_table[] = {
     { "mem-max",
       &main_memmax,
       "Set the maximum amount reservation for a domain",
-      "<Domain> <MemKB['b'[bytes]|'k'[KB]|'m'[MB]|'g'[GB]|'t'[TB]]>",
+      "<Domain> <MemMB['b'[bytes]|'k'[KB]|'m'[MB]|'g'[GB]|'t'[TB]]>",
     },
     { "mem-set",
       &main_memset,
       "Set the current memory usage for a domain",
-      "<Domain> <MemKB['b'[bytes]|'k'[KB]|'m'[MB]|'g'[GB]|'t'[TB]]>",
+      "<Domain> <MemMB['b'[bytes]|'k'[KB]|'m'[MB]|'g'[GB]|'t'[TB]]>",
     },
     { "button-press",
       &main_button_press,