|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH 2/2] ui/spice-core: report version in 'info spice' |
Date: | Wed, 10 Aug 2011 08:54:36 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Red Hat/3.1.11-2.el6_1 Thunderbird/3.1.11 |
On 08/09/11 22:53, Alon Levy wrote:
Signed-off-by: Alon Levy<address@hidden> --- ui/spice-core.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 3d77c01..342ed6c 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: %d.%d.%d\n", + (SPICE_SERVER_VERSION& 0xff0000)>> 16, + (SPICE_SERVER_VERSION& 0xff00)>> 8, + SPICE_SERVER_VERSION& 0xff);
No. You should should stick this info into the dict in do_info_spice, then just get it from the dict for printing like it is done for auth. This way you'll have the information in the qmp monitor too.
I think it would also be nice to somehow hint this is the spice version qemu was compiled against. The shared library which is actually used might be newer.
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |