lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-af98f2273fd0af31ce327cd1406b67c7be0b6734@git.kernel.org>
Date:   Tue, 28 Nov 2017 22:30:37 -0800
From:   tip-bot for Namhyung Kim <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     namhyung@...nel.org, hpa@...or.com, jolsa@...nel.org,
        uneedsihyeon@...il.com, tglx@...utronix.de,
        linux-kernel@...r.kernel.org, treeze.taeung@...il.com,
        acme@...hat.com, mingo@...nel.org
Subject: [tip:perf/core] perf help: Fix a bug during strstart() conversion

Commit-ID:  af98f2273fd0af31ce327cd1406b67c7be0b6734
Gitweb:     https://git.kernel.org/tip/af98f2273fd0af31ce327cd1406b67c7be0b6734
Author:     Namhyung Kim <namhyung@...nel.org>
AuthorDate: Tue, 14 Nov 2017 09:15:42 +0900
Committer:  Arnaldo Carvalho de Melo <acme@...hat.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@...hat.com>
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Tested-by: Taeung Song <treeze.taeung@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Sihyeon Jang <uneedsihyeon@...il.com>
Cc: kernel-team@....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@...hat.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ