From patchwork Mon Dec 6 18:24:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 74444 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 62B1FB6EE9 for ; Tue, 7 Dec 2010 05:40:38 +1100 (EST) Received: from localhost ([127.0.0.1]:52612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPfzH-00021n-Nn for incoming@patchwork.ozlabs.org; Mon, 06 Dec 2010 13:40:35 -0500 Received: from [140.186.70.92] (port=36155 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPfk6-0003LG-VX for qemu-devel@nongnu.org; Mon, 06 Dec 2010 13:24:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPfk1-0004Ei-U2 for qemu-devel@nongnu.org; Mon, 06 Dec 2010 13:24:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPfk1-0004ES-No for qemu-devel@nongnu.org; Mon, 06 Dec 2010 13:24:49 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB6IOmih021265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Dec 2010 13:24:49 -0500 Received: from localhost ([10.3.113.17]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB6IOldS009708; Mon, 6 Dec 2010 13:24:48 -0500 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Mon, 6 Dec 2010 16:24:05 -0200 Message-Id: <1291659852-23028-19-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1291659852-23028-1-git-send-email-lcapitulino@redhat.com> References: <1291659852-23028-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: aliguori@us.ibm.com, armbru@redhat.com Subject: [Qemu-devel] [PATCH 18/25] Monitor: Move qmp_query_name() up in monitor.c 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 So that next commit can change do_info_name_print() to call it. Signed-off-by: Luiz Capitulino --- monitor.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index 59b3866..89325d8 100644 --- a/monitor.c +++ b/monitor.c @@ -748,6 +748,12 @@ static void do_info_version(Monitor *mon) qobject_decref(data); } +static void qmp_query_name(Monitor *mon, QObject **ret_data) +{ + *ret_data = qemu_name ? qobject_from_jsonf("{'name': %s }", qemu_name) : + qobject_from_jsonf("{}"); +} + static void do_info_name_print(Monitor *mon, const QObject *data) { QDict *qdict; @@ -760,12 +766,6 @@ static void do_info_name_print(Monitor *mon, const QObject *data) monitor_printf(mon, "%s\n", qdict_get_str(qdict, "name")); } -static void qmp_query_name(Monitor *mon, QObject **ret_data) -{ - *ret_data = qemu_name ? qobject_from_jsonf("{'name': %s }", qemu_name) : - qobject_from_jsonf("{}"); -} - static QObject *get_cmd_dict(const char *name) { const char *p;