From patchwork Fri Jul 5 16:14:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11033009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9F1A13BD for ; Fri, 5 Jul 2019 16:14:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6A2A28723 for ; Fri, 5 Jul 2019 16:14:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99B8D287D2; Fri, 5 Jul 2019 16:14:25 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0274D28723 for ; Fri, 5 Jul 2019 16:14:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727401AbfGEQOY (ORCPT ); Fri, 5 Jul 2019 12:14:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:44886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727346AbfGEQOY (ORCPT ); Fri, 5 Jul 2019 12:14:24 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5336E216FD; Fri, 5 Jul 2019 16:14:23 +0000 (UTC) Date: Fri, 5 Jul 2019 12:14:21 -0400 From: Steven Rostedt To: Linux Trace Devel Cc: Slavomir Kaslev , Yordan Karadzhov , Tzvetomir Stoyanov Subject: [PATCH] trace-cmd: Add git version string to trace-cmd --version output Message-ID: <20190705121421.17af9096@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Steven Rostedt (VMware)" Commit d74f3845ddebf0 ("trace-cmd: Make the version defines part of tc-version.h") created a VERSION_GIT define to include in the trace.dat file. It would also be helpful to have this displayed with the --version option too. Signed-off-by: Steven Rostedt (VMware) --- tracecmd/trace-usage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c index 406384c4..2532d92a 100644 --- a/tracecmd/trace-usage.c +++ b/tracecmd/trace-usage.c @@ -314,8 +314,8 @@ void usage(char **argv) p = basename(arg); printf("\n" - "%s version %s\n\n" - "usage:\n", p, VERSION_STRING); + "%s version %s (%s)\n\n" + "usage:\n", p, VERSION_STRING, VERSION_GIT); if (argv[1]) help = find_help(argv[1]);