From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr2ge-0000kG-MQ for qemu-devel@nongnu.org; Wed, 10 Aug 2011 02:54:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qr2ga-0008Lw-SW for qemu-devel@nongnu.org; Wed, 10 Aug 2011 02:54:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr2ga-0008Lq-LH for qemu-devel@nongnu.org; Wed, 10 Aug 2011 02:54:40 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7A6sdna028882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Aug 2011 02:54:39 -0400 Message-ID: <4E422B2C.6090405@redhat.com> Date: Wed, 10 Aug 2011 08:54:36 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1312923215-11824-1-git-send-email-alevy@redhat.com> <1312923215-11824-2-git-send-email-alevy@redhat.com> In-Reply-To: <1312923215-11824-2-git-send-email-alevy@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] ui/spice-core: report version in 'info spice' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org On 08/09/11 22:53, Alon Levy wrote: > Signed-off-by: Alon Levy > --- > 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