Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754158AbbBZPGm (ORCPT ); Thu, 26 Feb 2015 10:06:42 -0500 Received: from mail.kernel.org ([198.145.29.136]:41040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753643AbbBZPGl (ORCPT ); Thu, 26 Feb 2015 10:06:41 -0500 Date: Thu, 26 Feb 2015 12:06:37 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: Peter Zijlstra , Adrian Hunter , linux-kernel@vger.kernel.org, Ingo Molnar , Paul Mackerras , Jiri Olsa , Namhyung Kim , Borislav Petkov , Hemant Kumar Subject: Re: [perf/core PATCH v5 4/4] perf-buildid-cache: Show usage with incorrect params Message-ID: <20150226150637.GC13373@kernel.org> References: <20150226065433.23912.75229.stgit@localhost.localdomain> <20150226065501.23912.7088.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150226065501.23912.7088.stgit@localhost.localdomain> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1411 Lines: 37 Em Thu, Feb 26, 2015 at 03:55:01PM +0900, Masami Hiramatsu escreveu: > Show usage if no action is specified or unexpected parameter > is given. In other words, be more user friendly. Thanks for doing that! Doesn't apply due to previous patches being delayer at the moment. - Arnaldo > Signed-off-by: Masami Hiramatsu > --- > tools/perf/builtin-buildid-cache.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c > index 20be743..5eaa9bf 100644 > --- a/tools/perf/builtin-buildid-cache.c > +++ b/tools/perf/builtin-buildid-cache.c > @@ -340,6 +340,11 @@ int cmd_buildid_cache(int argc, const char **argv, > argc = parse_options(argc, argv, buildid_cache_options, > buildid_cache_usage, 0); > > + if (argc || (!add_name_list_str && !kcore_filename && > + !remove_name_list_str && !purge_name_list_str && > + !missing_filename && !update_name_list_str)) > + usage_with_options(buildid_cache_usage, buildid_cache_options); > + > if (missing_filename) { > file.path = missing_filename; > file.force = force; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/