* [Qemu-devel] [PATCH v3] ui/spice-core: report version in info spice/query-spice
@ 2011-08-10 8:21 Alon Levy
0 siblings, 0 replies; only message in thread
From: Alon Levy @ 2011-08-10 8:21 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..f22f1d6 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, " compiled: %"PRId64".%"PRId64".%"PRId64"\n",
+ qdict_get_int(server, "compiled-version-major"),
+ qdict_get_int(server, "compiled-version-minor"),
+ qdict_get_int(server, "compiled-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, "compiled-version-major",
+ qint_from_int((SPICE_SERVER_VERSION & 0xff0000) >> 16));
+ qdict_put(server, "compiled-version-minor",
+ qint_from_int((SPICE_SERVER_VERSION & 0xff00) >> 8));
+ qdict_put(server, "compiled-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 8:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-10 8:21 [Qemu-devel] [PATCH v3] ui/spice-core: report version in info spice/query-spice Alon Levy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.