From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr3SU-0001wr-7g for qemu-devel@nongnu.org; Wed, 10 Aug 2011 03:44:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qr3SR-0001Zx-Hr for qemu-devel@nongnu.org; Wed, 10 Aug 2011 03:44:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr3SR-0001Zr-80 for qemu-devel@nongnu.org; Wed, 10 Aug 2011 03:44:07 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7A7i6RU022270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Aug 2011 03:44:06 -0400 Date: Wed, 10 Aug 2011 10:43:29 +0300 From: Alon Levy Message-ID: <20110810074329.GE5637@bow.redhat.com> References: <1312923215-11824-1-git-send-email-alevy@redhat.com> <1312923215-11824-2-git-send-email-alevy@redhat.com> <4E422B2C.6090405@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E422B2C.6090405@redhat.com> 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: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Wed, Aug 10, 2011 at 08:54:36AM +0200, Gerd Hoffmann wrote: > 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 sent a second patch (fixing the above), but didn't do any hinting. I'll send a third. > version qemu was compiled against. The shared library which is > actually used might be newer. I thought of this problem but decided it's better to at least have the compiled version (getting the linked against version is not hard, but I'd rather not force to do it at this moment - I guess via dlopen. Which is linux specific - will need yet another wrapper for that api to compile on windows). > > cheers, > Gerd >