summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-06-26 12:24:03 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-01 22:50:40 -0300
commit2a60689a33a61f000bd90596b1289babcb861cd9 (patch)
tree3c47e4a88c0bbdde57bf42b8a5f1b9b6f08eee51 /tools/include
parent13c230ab6e56c6ae3a968f01f4c6505b794cecad (diff)
downloadlinux-2a60689a33a61f000bd90596b1289babcb861cd9.tar.gz
linux-2a60689a33a61f000bd90596b1289babcb861cd9.tar.bz2
linux-2a60689a33a61f000bd90596b1289babcb861cd9.zip
tools lib: Adopt strreplace() from the kernel
We'll use it to further reduce the size of tools/perf/util/string.c, replacing the strxfrchar() equivalent function we have there. 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-x3r61ikjrso1buygxwke8id3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/linux/string.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h
index e436f8037c87..a76d4df10435 100644
--- a/tools/include/linux/string.h
+++ b/tools/include/linux/string.h
@@ -19,6 +19,8 @@ extern size_t strlcpy(char *dest, const char *src, size_t size);
char *str_error_r(int errnum, char *buf, size_t buflen);
+char *strreplace(char *s, char old, char new);
+
/**
* strstarts - does @str start with @prefix?
* @str: string to examine