]> git.proxmox.com Git - qemu.git/commitdiff
monitor: Convert do_balloon() to QObject
authorLuiz Capitulino <lcapitulino@redhat.com>
Wed, 7 Oct 2009 16:42:01 +0000 (13:42 -0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 9 Oct 2009 02:17:19 +0000 (21:17 -0500)
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.

Patchworks-ID: 35349
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor.c
qemu-monitor.hx

index d393ad52719ab3d1056c910ce7041bb54ebfa4a1..22e87abd3433bea20cdaf333044cc7f429baa14d 100644 (file)
--- 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;
index 8dca4f19d4e6fd64e3be028a8141f0b261c45157..29999c6e384ecf56ba1d3bb834c314df0b648cfd 100644 (file)
@@ -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