]> git.baikalelectronics.ru Git - kernel.git/commit
tools include: Adopt strstarts() from the kernel
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 20 Jul 2017 18:27:39 +0000 (15:27 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 20 Jul 2017 18:46:10 +0000 (15:46 -0300)
commit9423be57893d4fa7b97d039f3e530591125e0097
treef3f082ab6d3e1916353b59e7f70735183cc72722
parentf69358d1c8ba95e21e356e7b256fe6d9ebedcc09
tools include: Adopt strstarts() from the kernel

Replacing prefixcmp(), same purpose, inverted result, so standardize on
the kernel variant, to reduce silly differences among tools/ and the
kernel sources, making it easier for people to work in both codebases.

And then doing:

if (strstarts(option, "no-"))

Looks clearer than doing:

if (!prefixcmp(option, "no-"))

To figure out if option starts witn "no-".

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-kaei42gi7lpa8subwtv7eug8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
15 files changed:
tools/include/linux/string.h
tools/lib/string.c
tools/lib/subcmd/help.c
tools/lib/subcmd/parse-options.c
tools/perf/builtin-config.c
tools/perf/builtin-ftrace.c
tools/perf/builtin-help.c
tools/perf/perf.c
tools/perf/ui/browser.c
tools/perf/ui/browsers/annotate.c
tools/perf/ui/stdio/hist.c
tools/perf/util/bpf-loader.c
tools/perf/util/callchain.c
tools/perf/util/config.c
tools/perf/util/llvm-utils.c