summaryrefslogtreecommitdiff
path: root/tools/perf/util/dso.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-06-26 12:45:09 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-01 22:50:40 -0300
commitaf0de0c5f060b1d4eae6033043eb9eafd15aa738 (patch)
tree4e80b9e526e03335f0f0b6256d35261531c1b61e /tools/perf/util/dso.c
parent2a60689a33a61f000bd90596b1289babcb861cd9 (diff)
downloadlwn-af0de0c5f060b1d4eae6033043eb9eafd15aa738.tar.gz
lwn-af0de0c5f060b1d4eae6033043eb9eafd15aa738.zip
perf tools: Drop strxfrchar(), use strreplace() equivalent from kernel
No change in behaviour intended, just reducing the codebase and using something available in tools/lib/. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-oyi6zif3810nwi4uu85odnhv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/dso.c')
-rw-r--r--tools/perf/util/dso.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 1fb18292c2d3..c7fde04400f7 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <asm/bug.h>
#include <linux/kernel.h>
+#include <linux/string.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/types.h>
@@ -394,7 +395,7 @@ int __kmod_path__parse(struct kmod_path *m, const char *path,
return -ENOMEM;
}
- strxfrchar(m->name, '-', '_');
+ strreplace(m->name, '-', '_');
}
return 0;