mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: namhyung@kernel.org, hpa@zytor.com, jolsa@kernel.org,
	uneedsihyeon@gmail.com, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, treeze.taeung@gmail.com,
	acme@redhat.com, mingo@kernel.org
Subject: [tip:perf/core] perf help: Fix a bug during strstart() conversion
Date: Tue, 28 Nov 2017 22:30:37 -0800	[thread overview]
Message-ID: <tip-af98f2273fd0af31ce327cd1406b67c7be0b6734@git.kernel.org> (raw)
In-Reply-To: <20171114001542.GA16464@sejong>

Commit-ID:  af98f2273fd0af31ce327cd1406b67c7be0b6734
Gitweb:     https://git.kernel.org/tip/af98f2273fd0af31ce327cd1406b67c7be0b6734
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 14 Nov 2017 09:15:42 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 28 Nov 2017 14:21:18 -0300

perf help: Fix a bug during strstart() conversion

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 bd1fede..a0f7ed2 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;

      parent reply	other threads:[~2017-11-29  6:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-12  1:10 [PATCH 1/3] perf help: Document missing options Sihyeon Jang
2017-11-12  1:10 ` [PATCH 2/3] perf top: " Sihyeon Jang
2017-11-13 18:25   ` Arnaldo Carvalho de Melo
2017-11-18  8:29   ` [tip:perf/core] " tip-bot for Sihyeon Jang
2017-11-12  1:10 ` [PATCH 3/3] perf top: Remove a duplicate word Sihyeon Jang
2017-11-13 18:27   ` Arnaldo Carvalho de Melo
2017-11-18  8:29   ` [tip:perf/core] " tip-bot for Sihyeon Jang
2017-11-13 18:29 ` [PATCH 1/3] perf help: Document missing options Arnaldo Carvalho de Melo
2017-11-14  0:15   ` Namhyung Kim
2017-11-14  2:18     ` Taeung Song
2017-11-14 13:03       ` Arnaldo Carvalho de Melo
2017-11-14 13:00     ` Arnaldo Carvalho de Melo
2017-11-18  8:32     ` [tip:perf/core] perf help: Fix a bug during strstart() conversion tip-bot for Namhyung Kim
2017-11-29  6:30     ` tip-bot for Namhyung Kim [this message]

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=tip-af98f2273fd0af31ce327cd1406b67c7be0b6734@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=treeze.taeung@gmail.com \
    --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

Powered by JetHome