perf help: Introduce exec_failed() to avoid code duplication
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 27 Jun 2017 13:52:57 +0000 (10:52 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 27 Jun 2017 13:52:57 +0000 (10:52 -0300)
commit881c362d34ef76600b859e3a034d4155139bad2c
treeca40b870b417b62141932e69f61aad85f9f7d555
parent19508c048a2f90facb64624340bf1b7ee555442e
perf help: Introduce exec_failed() to avoid code duplication

The warning(str_error_r(errno)) pattern can be replaced with a function,
do it.

And while at it use pr_warning(), we have way too many error reporting
facilities, time to drop some, starting with the one we got from the git
sources.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-lbak5npj1ri1uuvf1en3c0p0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-help.c