From patchwork Wed Oct 7 00:27:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 35184 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DDBC7B7BA5 for ; Wed, 7 Oct 2009 11:48:29 +1100 (EST) Received: from localhost ([127.0.0.1]:54685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvKhe-0000st-SX for incoming@patchwork.ozlabs.org; Tue, 06 Oct 2009 20:48:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvKNq-0001k7-PB for qemu-devel@nongnu.org; Tue, 06 Oct 2009 20:27:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvKNm-0001gc-On for qemu-devel@nongnu.org; Tue, 06 Oct 2009 20:27:58 -0400 Received: from [199.232.76.173] (port=45752 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvKNm-0001gQ-Ka for qemu-devel@nongnu.org; Tue, 06 Oct 2009 20:27:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17191) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvKNm-000768-8T for qemu-devel@nongnu.org; Tue, 06 Oct 2009 20:27:54 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n970RrgQ012219; Tue, 6 Oct 2009 20:27:53 -0400 Received: from localhost (vpn-12-79.rdu.redhat.com [10.11.12.79]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n970RpaR012068; Tue, 6 Oct 2009 20:27:52 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Tue, 6 Oct 2009 21:27:09 -0300 Message-Id: <1254875232-25012-13-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1254875232-25012-1-git-send-email-lcapitulino@redhat.com> References: <1254875232-25012-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: aliguori@us.ibm.com, avi@redhat.com Subject: [Qemu-devel] [PATCH 12/15] monitor: Convert do_balloon() to QObject X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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)" },