qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] ui/spice-core: report version in info spice/query-spice
@ 2011-08-10  7:41 Alon Levy
  0 siblings, 0 replies; only message in thread
From: Alon Levy @ 2011-08-10  7:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel

Signed-off-by: Alon Levy <alevy@redhat.com>
---
 ui/spice-core.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/ui/spice-core.c b/ui/spice-core.c
index 3d77c01..4fb1b30 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -372,6 +372,10 @@ void do_info_spice_print(Monitor *mon, const QObject *data)
         monitor_printf(mon, "     address: %s:%d [tls]\n", host, port);
     }
     monitor_printf(mon, "        auth: %s\n", qdict_get_str(server, "auth"));
+    monitor_printf(mon, "     version: %"PRId64".%"PRId64".%"PRId64"\n",
+                   qdict_get_int(server, "version_major"),
+                   qdict_get_int(server, "version_minor"),
+                   qdict_get_int(server, "version_micro"));
 
     channels = qdict_get_qlist(server, "channels");
     if (qlist_empty(channels)) {
@@ -403,6 +407,12 @@ void do_info_spice(Monitor *mon, QObject **ret_data)
     qdict_put(server, "enabled", qbool_from_int(true));
     qdict_put(server, "auth", qstring_from_str(auth));
     qdict_put(server, "host", qstring_from_str(addr ? addr : "0.0.0.0"));
+    qdict_put(server, "version_major",
+              qint_from_int((SPICE_SERVER_VERSION & 0xff0000) >> 16));
+    qdict_put(server, "version_minor",
+              qint_from_int((SPICE_SERVER_VERSION & 0xff00) >> 8));
+    qdict_put(server, "version_micro",
+              qint_from_int(SPICE_SERVER_VERSION & 0xff));
     if (port) {
         qdict_put(server, "port", qint_from_int(port));
     }
-- 
1.7.6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-10  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-10  7:41 [Qemu-devel] [PATCH v2] ui/spice-core: report version in info spice/query-spice Alon Levy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).