[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xl: make mem-set and mem-max to use MB for memory unit by default.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275890164 -3600
# Node ID efa8d417e1a0758eeb338eb154d33b72dad7f291
# Parent  c514d69c71d8c07fc3f86b7216dd1c3fef126451
xl: make mem-set and mem-max to use MB for memory unit by default.

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c  |    4 +---
 tools/libxl/xl_cmdtable.c |    4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff -r c514d69c71d8 -r efa8d417e1a0 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Fri Jun 04 11:39:06 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Mon Jun 07 06:56:04 2010 +0100
@@ -1239,9 +1239,9 @@ static int64_t parse_mem_size_kb(char *m
         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 *me
         exit(3);
     }
 
-    printf("setting domid %d memory to : %lld\n", domid, memorykb);
     libxl_set_memory_target(&ctx, domid, memorykb, /* enforce */ 1);
 }
 
diff -r c514d69c71d8 -r efa8d417e1a0 tools/libxl/xl_cmdtable.c
--- a/tools/libxl/xl_cmdtable.c Fri Jun 04 11:39:06 2010 +0100
+++ b/tools/libxl/xl_cmdtable.c Mon Jun 07 06:56:04 2010 +0100
@@ -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,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.