From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvZbO-0002UZ-3V for qemu-devel@nongnu.org; Wed, 07 Oct 2009 12:42:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvZbJ-0002SE-UG for qemu-devel@nongnu.org; Wed, 07 Oct 2009 12:42:57 -0400 Received: from [199.232.76.173] (port=49992 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvZbJ-0002S7-P7 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 12:42:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1031) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvZbI-0005Vr-TW for qemu-devel@nongnu.org; Wed, 07 Oct 2009 12:42:53 -0400 From: Luiz Capitulino Date: Wed, 7 Oct 2009 13:42:01 -0300 Message-Id: <1254933724-22485-16-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1254933724-22485-1-git-send-email-lcapitulino@redhat.com> References: <1254933724-22485-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 15/18] monitor: Convert do_balloon() to QObject List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, avi@redhat.com 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 --- 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