Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753353AbbB1Jfz (ORCPT ); Sat, 28 Feb 2015 04:35:55 -0500 Received: from terminus.zytor.com ([198.137.202.10]:45200 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbbB1Jfu (ORCPT ); Sat, 28 Feb 2015 04:35:50 -0500 Date: Sat, 28 Feb 2015 01:35:28 -0800 From: tip-bot for Masami Hiramatsu Message-ID: Cc: bp@suse.de, acme@redhat.com, tglx@linutronix.de, namhyung@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, masami.hiramatsu.pt@hitachi.com, hpa@zytor.com, jolsa@kernel.org, a.p.zijlstra@chello.nl, hemant@linux.vnet.ibm.com, adrian.hunter@intel.com, paulus@samba.org Reply-To: jolsa@kernel.org, hpa@zytor.com, masami.hiramatsu.pt@hitachi.com, paulus@samba.org, adrian.hunter@intel.com, hemant@linux.vnet.ibm.com, a.p.zijlstra@chello.nl, acme@redhat.com, bp@suse.de, namhyung@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de In-Reply-To: <20150227045030.1999.44006.stgit@localhost.localdomain> References: <20150227045030.1999.44006.stgit@localhost.localdomain> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf buildid-cache: Show usage with incorrect params Git-Commit-ID: 0497d0a8201a38f0c95edc8a1fc0325f2f879ddb X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1998 Lines: 47 Commit-ID: 0497d0a8201a38f0c95edc8a1fc0325f2f879ddb Gitweb: http://git.kernel.org/tip/0497d0a8201a38f0c95edc8a1fc0325f2f879ddb Author: Masami Hiramatsu AuthorDate: Fri, 27 Feb 2015 13:50:31 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 27 Feb 2015 15:52:40 -0300 perf buildid-cache: Show usage with incorrect params Show usage if no action is specified or unexpected parameter is given. In other words, be more user friendly. Signed-off-by: Masami Hiramatsu Cc: Adrian Hunter Cc: Borislav Petkov Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20150227045030.1999.44006.stgit@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo --- 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 04466c4..d47a0cd 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c @@ -343,6 +343,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/