From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755746AbdCGPju (ORCPT ); Tue, 7 Mar 2017 10:39:50 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34138 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755577AbdCGPj2 (ORCPT ); Tue, 7 Mar 2017 10:39:28 -0500 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , kernel-team@lge.com Subject: [PATCH 02/23] perf buildid-cache: Add -q/--quiet option Date: Wed, 8 Mar 2017 00:08:30 +0900 Message-Id: <20170307150851.22304-3-namhyung@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170307150851.22304-1-namhyung@kernel.org> References: <20170307150851.22304-1-namhyung@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The -q/--quiet option is to suppress any message. Sometimes users just want to run the command and it can be used for that case. Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-buildid-cache.txt | 4 ++++ tools/perf/builtin-buildid-cache.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tools/perf/Documentation/perf-buildid-cache.txt b/tools/perf/Documentation/perf-buildid-cache.txt index 058064db39d2..b9c2f8c9fcef 100644 --- a/tools/perf/Documentation/perf-buildid-cache.txt +++ b/tools/perf/Documentation/perf-buildid-cache.txt @@ -61,6 +61,10 @@ OPTIONS --verbose:: Be more verbose. +-q:: +--quiet:: + Do not show any message. + SEE ALSO -------- linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1] diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index 30e2b2cb2421..ff437a678976 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c @@ -311,6 +311,7 @@ int cmd_buildid_cache(int argc, const char **argv, OPT_STRING('u', "update", &update_name_list_str, "file list", "file(s) to update"), OPT_INCR('v', "verbose", &verbose, "be more verbose"), + OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"), OPT_END() }; const char * const buildid_cache_usage[] = { @@ -326,6 +327,9 @@ int cmd_buildid_cache(int argc, const char **argv, !missing_filename && !update_name_list_str)) usage_with_options(buildid_cache_usage, buildid_cache_options); + if (quiet) + perf_quiet_option(); + if (missing_filename) { file.path = missing_filename; file.force = force; -- 2.11.0