diff mbox

[12/15] monitor: Convert do_balloon() to QObject

Message ID 1254875232-25012-13-git-send-email-lcapitulino@redhat.com
State Changes Requested
Headers show

Commit Message

Luiz Capitulino Oct. 7, 2009, 12:27 a.m. UTC
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 <lcapitulino@redhat.com>
---
 monitor.c       |    6 ++++--
 qemu-monitor.hx |    2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 094b090..cb28ffb 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1603,8 +1603,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 935e8ea..efaabea 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -917,7 +917,7 @@  ETEXI
         .name       = "balloon",
         .args_type  = "value:i",
         .handler    = do_balloon,
-        .user_print = NULL,
+        .user_print = monitor_user_noop,
         .params     = "target",
         .help       = "request VM to change it's memory allocation (in MB)"
     },