Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtNwT-0007mH-2L for qemu-devel@nongnu.org; Thu, 01 Oct 2009 11:51:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtNwP-0007fd-1e for qemu-devel@nongnu.org; Thu, 01 Oct 2009 11:51:40 -0400 Received: from [199.232.76.173] (port=54696 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtNwO-0007fG-Mf for qemu-devel@nongnu.org; Thu, 01 Oct 2009 11:51:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54316) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtNwO-0003fG-4a for qemu-devel@nongnu.org; Thu, 01 Oct 2009 11:51:36 -0400 From: Luiz Capitulino Date: Thu, 1 Oct 2009 12:50:42 -0300 Message-Id: <1254412245-10452-12-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1254412245-10452-1-git-send-email-lcapitulino@redhat.com> References: <1254412245-10452-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 11/14] 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 observe 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 | 7 +++++-- qemu-monitor.hx | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 87fd91c..852e558 100644 --- a/monitor.c +++ b/monitor.c @@ -1636,8 +1636,11 @@ 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, + MonitorError *error) { int value = qdict_get_int(qdict, "value"); ram_addr_t target = value; diff --git a/qemu-monitor.hx b/qemu-monitor.hx index e848b1d..7cde9d9 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -936,8 +936,8 @@ ETEXI .name = "balloon", .args_type = "value:i", .handler = do_balloon, - .user_print = NULL, - .user_error = NULL, + .user_print = monitor_user_noop, + .user_error = monitor_error_noop, .params = "target", .help = "request VM to change it's memory allocation (in MB)" }, -- 1.6.5.rc2