qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 15/18] monitor: Convert do_balloon() to QObject


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 15/18] monitor: Convert do_balloon() to QObject
Date: Wed, 7 Oct 2009 13:32:12 -0300

It is important to note that it never fails, as big refactoring
of the virtio code would be needed to get the proper error code.

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

diff --git a/monitor.c b/monitor.c
index d393ad5..22e87ab 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1602,8 +1602,10 @@ static void do_info_status(Monitor *mon)
        monitor_printf(mon, "VM status: paused\n");
 }
 
-
-static void do_balloon(Monitor *mon, const QDict *qdict)
+/**
+ * do_balloon(): Request VM to change its memory allocation
+ */
+static void do_balloon(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     int value = qdict_get_int(qdict, "value");
     ram_addr_t target = value;
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 8dca4f1..29999c6 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -874,7 +874,8 @@ ETEXI
         .args_type  = "value:i",
         .params     = "target",
         .help       = "request VM to change it's memory allocation (in MB)",
-        .mhandler.cmd = do_balloon,
+        .user_print = monitor_user_noop,
+        .mhandler.cmd_new = do_balloon,
     },
 
 STEXI
-- 
1.6.5.rc2.17.gdbc1b





reply via email to

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