From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Sihyeon Jang <uneedsihyeon@gmail.com>,
kernel-team@lge.com, Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 08/30] perf help: Fix a bug during strstart() conversion
Date: Tue, 28 Nov 2017 12:01:58 -0300 [thread overview]
Message-ID: <20171128150220.5064-9-acme@kernel.org> (raw)
In-Reply-To: <20171128150220.5064-1-acme@kernel.org>
From: Namhyung Kim <namhyung@kernel.org>
The commit 8e99b6d4533c changed prefixcmp() to strstart() but missed to
change the return value in some place. It makes perf help print
annoying output even for sane config items like below:
$ perf help
'.root': unsupported man viewer sub key.
...
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Sihyeon Jang <uneedsihyeon@gmail.com>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20171114001542.GA16464@sejong
Fixes: 8e99b6d4533c ("tools include: Adopt strstarts() from the kernel")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-help.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index bd1fedef3d1c..a0f7ed2b869b 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -284,7 +284,7 @@ static int perf_help_config(const char *var, const char *value, void *cb)
add_man_viewer(value);
return 0;
}
- if (!strstarts(var, "man."))
+ if (strstarts(var, "man."))
return add_man_viewer_info(var, value);
return 0;
@@ -314,7 +314,7 @@ static const char *cmd_to_page(const char *perf_cmd)
if (!perf_cmd)
return "perf";
- else if (!strstarts(perf_cmd, "perf"))
+ else if (strstarts(perf_cmd, "perf"))
return perf_cmd;
return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s;
--
2.13.6
next prev parent reply other threads:[~2017-11-28 15:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 15:01 [GIT PULL 00/30] perf/urgent fixes Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 01/30] perf evlist: Set the correct idx when adding dummy events Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 02/30] perf record: Generate PERF_RECORD_{MMAP,COMM,EXEC} with --delay Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 03/30] perf record: Fix -c/-F options for cpu event aliases Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 04/30] perf trace: Fix an exit code of trace__symbols_init Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 05/30] perf evsel: Fix up leftover perf_evsel_stat usage via evsel->priv Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 06/30] perf script: Fix --per-event-dump for auxtrace synth evsels Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 07/30] perf machine: Guard against NULL in machine__exit() Arnaldo Carvalho de Melo
2017-11-28 15:01 ` Arnaldo Carvalho de Melo [this message]
2017-11-28 15:01 ` [PATCH 09/30] perf annotate: Do not truncate instruction names at 6 chars Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 10/30] perf test shell: Fix check open filename arg using 'perf trace' on s390x Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 11/30] perf test shell: Fix test case probe libc's inet_pton " Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 12/30] perf evlist: Add helper to check if attr.exclude_kernel is set in all evsels Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 13/30] perf report: Ignore kptr_restrict when not sampling the kernel Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 14/30] perf record: " Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 15/30] perf top: " Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 16/30] perf: Fix header.size for namespace events Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 17/30] perf top: Fix window dimensions change handling Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 18/30] perf top: Use signal interface for SIGWINCH handler Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 19/30] perf bench numa: Fixup discontiguous/sparse numa nodes Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 20/30] perf test: Fix test 21 for s390x Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 21/30] perf intel-pt: Bring instruction decoder files into line with the kernel Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 22/30] tools/headers: Synchronize kernel x86 UAPI headers Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 23/30] tools headers: Synchronize kernel ABI headers wrt SPDX tags Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 24/30] tools headers: Synchronize perf_event.h header Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 25/30] tools headers uapi: Synchronize drm/drm.h Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 26/30] tools headers: Synchronize drm/i915_drm.h Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 27/30] tools headers: Synchronize KVM arch ABI headers Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 28/30] tools headers: Synchronize prctl.h ABI header Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 29/30] tools headers: Syncronize mman.h " Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 30/30] perf tools s390: Do not include header files from the kernel sources Arnaldo Carvalho de Melo
2017-11-28 16:20 ` [GIT PULL 00/30] perf/urgent fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171128150220.5064-9-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=uneedsihyeon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).