qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 7/7] monitor: do_balloon(): Use 'M' argument type


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 7/7] monitor: do_balloon(): Use 'M' argument type
Date: Fri, 18 Dec 2009 13:25:05 -0200

This makes do_balloon() accept megabyte values from the user
Monitor while accepting byte values for QMP.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 monitor.c       |    3 +--
 qemu-monitor.hx |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/monitor.c b/monitor.c
index f779680..6f5b90d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2083,8 +2083,7 @@ static void do_balloon(Monitor *mon, const QDict *qdict, 
QObject **ret_data)
 {
     if (balloon_get_value()) {
         /* ballooning is active */
-        ram_addr_t value = qdict_get_int(qdict, "value");
-        qemu_balloon(value << 20);
+        qemu_balloon(qdict_get_int(qdict, "value"));
     }
 }
 
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 338e30e..aac0f3e 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -887,7 +887,7 @@ ETEXI
 
     {
         .name       = "balloon",
-        .args_type  = "value:i",
+        .args_type  = "value:M",
         .params     = "target",
         .help       = "request VM to change it's memory allocation (in MB)",
         .user_print = monitor_user_noop,
-- 
1.6.6.rc3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]