From patchwork Wed Aug 10 08:21:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 109349 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F1675B71A0 for ; Wed, 10 Aug 2011 18:22:46 +1000 (EST) Received: from localhost ([::1]:41222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr43n-0002TK-N6 for incoming@patchwork.ozlabs.org; Wed, 10 Aug 2011 04:22:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:55471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr43f-0002T4-I4 for qemu-devel@nongnu.org; Wed, 10 Aug 2011 04:22:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qr43b-00015o-28 for qemu-devel@nongnu.org; Wed, 10 Aug 2011 04:22:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr43a-00015h-No for qemu-devel@nongnu.org; Wed, 10 Aug 2011 04:22:31 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7A8MTFE021110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Aug 2011 04:22:29 -0400 Received: from bow.redhat.com (vpn-203-215.tlv.redhat.com [10.35.203.215]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7A8MRxs028668; Wed, 10 Aug 2011 04:22:28 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Wed, 10 Aug 2011 11:21:53 +0300 Message-Id: <1312964513-11313-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kraxel@redhat.com Subject: [Qemu-devel] [PATCH v3] ui/spice-core: report version in info spice/query-spice X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Alon Levy --- 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)); }