From patchwork Thu Mar 16 09:00:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Justen X-Patchwork-Id: 9627687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC79B6048C for ; Thu, 16 Mar 2017 09:01:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E10E72866F for ; Thu, 16 Mar 2017 09:01:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5F8B28673; Thu, 16 Mar 2017 09:01:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 678A42866F for ; Thu, 16 Mar 2017 09:01:24 +0000 (UTC) Received: from localhost ([::1]:41688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coRHf-0002tp-Fp for patchwork-qemu-devel@patchwork.kernel.org; Thu, 16 Mar 2017 05:01:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coRHI-0002qg-8J for qemu-devel@nongnu.org; Thu, 16 Mar 2017 05:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coRHC-00081i-DY for qemu-devel@nongnu.org; Thu, 16 Mar 2017 05:01:00 -0400 Received: from mga09.intel.com ([134.134.136.24]:55651) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1coRHC-000816-0f for qemu-devel@nongnu.org; Thu, 16 Mar 2017 05:00:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489654853; x=1521190853; h=from:to:cc:subject:date:message-id; bh=c/12+KpNAKy4WTRZ0u35ZQZVXOaI87JgSpyoxDwenbo=; b=Qoo/GLeKM8Sc8xnODQynjYnWZiDWz41+DxmmkERxsmFFVHoP//kfQ2l4 xXDt+zipR1syT6ooSIeW8LLKMb9JJQ==; Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2017 02:00:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="76038864" Received: from perumand-mobl1.amr.corp.intel.com (HELO jljusten-skl.amr.corp.intel.com) ([10.254.5.112]) by orsmga005.jf.intel.com with ESMTP; 16 Mar 2017 02:00:50 -0700 From: Jordan Justen To: qemu-devel@nongnu.org Date: Thu, 16 Mar 2017 02:00:48 -0700 Message-Id: <20170316090048.23185-1-jordan.l.justen@intel.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.24 Subject: [Qemu-devel] [PATCH] qemu: Fix -version with configure --with-pkgversion X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , Fam Zheng , 1673373@bugs.launchpad.net, Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This appears to have regressed in 67a1de0d19. When the configure --with-pkgversion=foo option is used, the output from -version will look like: QEMU emulator version 2.8.90(foo) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers After this patch, it will be: QEMU emulator version 2.8.90 (foo) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers Cc: Paolo Bonzini Cc: Fam Zheng Fixes: https://bugs.launchpad.net/bugs/1673373 Cc: 1673373@bugs.launchpad.net Signed-off-by: Jordan Justen Reviewed-by: Thomas Huth --- Makefile | 2 +- configure | 2 +- vl.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1c4c04f6f2..c9df119798 100644 --- a/Makefile +++ b/Makefile @@ -289,7 +289,7 @@ qemu-version.h: FORCE printf '"$(PKGVERSION)"\n'; \ else \ if test -d .git; then \ - printf '" ('; \ + printf '"('; \ git describe --match 'v*' 2>/dev/null | tr -d '\n'; \ if ! git diff-index --quiet HEAD &>/dev/null; then \ printf -- '-dirty'; \ diff --git a/configure b/configure index 99d8bece70..e94b06b5fc 100755 --- a/configure +++ b/configure @@ -1004,7 +1004,7 @@ for opt do ;; --disable-blobs) blobs="no" ;; - --with-pkgversion=*) pkgversion=" ($optarg)" + --with-pkgversion=*) pkgversion="($optarg)" ;; --with-coroutine=*) coroutine="$optarg" ;; diff --git a/vl.c b/vl.c index 0b4ed5241c..3e60e61905 100644 --- a/vl.c +++ b/vl.c @@ -1904,7 +1904,7 @@ static void main_loop(void) static void version(void) { - printf("QEMU emulator version " QEMU_VERSION QEMU_PKGVERSION "\n" + printf("QEMU emulator version " QEMU_VERSION " " QEMU_PKGVERSION "\n" QEMU_COPYRIGHT "\n"); }