Patchwork [18/25] Monitor: Move qmp_query_name() up in monitor.c

login
register
mail settings
Submitter Luiz Capitulino
Date Dec. 6, 2010, 6:24 p.m.
Message ID <1291659852-23028-19-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/74444/
State New
Headers show

Comments

Luiz Capitulino - Dec. 6, 2010, 6:24 p.m.
So that next commit can change do_info_name_print() to call it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Patch

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;