From patchwork Tue Oct 13 16:57:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 35881 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 B7D52B7BA0 for ; Wed, 14 Oct 2009 04:12:53 +1100 (EST) Received: from localhost ([127.0.0.1]:41982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mxkva-0003C6-Uf for incoming@patchwork.ozlabs.org; Tue, 13 Oct 2009 13:12:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mxkh8-0004Kp-Qx for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:57:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mxkh4-0004I4-2k for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:57:54 -0400 Received: from [199.232.76.173] (port=51972 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mxkh3-0004Hs-Ss for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:57:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35917) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mxkh3-000266-C8 for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:57:49 -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 n9DGvmqj001136; Tue, 13 Oct 2009 12:57:48 -0400 Received: from localhost (vpn-13-167.rdu.redhat.com [10.11.13.167]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9DGvkXh009183; Tue, 13 Oct 2009 12:57:47 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Tue, 13 Oct 2009 13:57:06 -0300 Message-Id: <1255453026-18637-10-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1255453026-18637-1-git-send-email-lcapitulino@redhat.com> References: <1255453026-18637-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, kraxel@redhat.com Subject: [Qemu-devel] [PATCH 9/9] monitor: do_info_balloon(): use QError 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 Signed-off-by: Luiz Capitulino --- monitor.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index 6f0ad11..5d7c816 100644 --- a/monitor.c +++ b/monitor.c @@ -1717,10 +1717,9 @@ static void do_info_balloon(Monitor *mon, QObject **ret_data) actual = qemu_balloon_status(); if (kvm_enabled() && !kvm_has_sync_mmu()) - monitor_printf(mon, "Using KVM without synchronous MMU, " - "ballooning disabled\n"); + qemu_error_structed(QERR_BAL_MMU, NULL); else if (actual == 0) - monitor_printf(mon, "Ballooning not activated in VM\n"); + qemu_error_structed(QERR_BAL_DIS, NULL); else *ret_data = QOBJECT(qint_from_int((int)(actual >> 20))); }