diff mbox

[04/25] Monitor: Move qmp_query_version() up in monitor.c

Message ID 1291659852-23028-5-git-send-email-lcapitulino@redhat.com
State New
Headers show

Commit Message

Luiz Capitulino Dec. 6, 2010, 6:23 p.m. UTC
So that next commit can change do_info_version_print() to call it.

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

Patch

diff --git a/monitor.c b/monitor.c
index 481eab2..6252b3f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -714,21 +714,6 @@  help:
     help_cmd(mon, "info");
 }
 
-static void do_info_version_print(Monitor *mon, const QObject *data)
-{
-    QDict *qdict;
-    QDict *qemu;
-
-    qdict = qobject_to_qdict(data);
-    qemu = qdict_get_qdict(qdict, "qemu");
-
-    monitor_printf(mon, "%" PRId64 ".%" PRId64 ".%" PRId64 "%s\n",
-                  qdict_get_int(qemu, "major"),
-                  qdict_get_int(qemu, "minor"),
-                  qdict_get_int(qemu, "micro"),
-                  qdict_get_str(qdict, "package"));
-}
-
 static void qmp_query_version(Monitor *mon, QObject **ret_data)
 {
     const char *version = QEMU_VERSION;
@@ -745,6 +730,21 @@  static void qmp_query_version(Monitor *mon, QObject **ret_data)
         'micro': %d }, 'package': %s }", major, minor, micro, QEMU_PKGVERSION);
 }
 
+static void do_info_version_print(Monitor *mon, const QObject *data)
+{
+    QDict *qdict;
+    QDict *qemu;
+
+    qdict = qobject_to_qdict(data);
+    qemu = qdict_get_qdict(qdict, "qemu");
+
+    monitor_printf(mon, "%" PRId64 ".%" PRId64 ".%" PRId64 "%s\n",
+                  qdict_get_int(qemu, "major"),
+                  qdict_get_int(qemu, "minor"),
+                  qdict_get_int(qemu, "micro"),
+                  qdict_get_str(qdict, "package"));
+}
+
 static void do_info_name_print(Monitor *mon, const QObject *data)
 {
     QDict *qdict;