summaryrefslogtreecommitdiffstats
path: root/tools/lib/api/fs/fs.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2020-01-27 11:00:31 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-03-04 14:34:09 +0100
commit7982a898515064ba180d958bfc89ed22d13905ee (patch)
tree6bdc83844fbf9854fc97c1f155f370636917afb0 /tools/lib/api/fs/fs.h
parentMerge remote-tracking branch 'acme/perf/urgent' into perf/core (diff)
downloadlinux-7982a898515064ba180d958bfc89ed22d13905ee.tar.xz
linux-7982a898515064ba180d958bfc89ed22d13905ee.zip
tools lib api fs: Move cgroupsfs_find_mountpoint()
Move it from tools/perf/util/cgroup.c as it can be used by other places. Note that cgroup filesystem is different from others since it's usually mounted separately (in v1) for each subsystem. I just copied the code with a little modification to pass a name of subsystem. Suggested-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20200127100031.1368732-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/api/fs/fs.h')
-rw-r--r--tools/lib/api/fs/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/api/fs/fs.h b/tools/lib/api/fs/fs.h
index 92d03b8396b1..936edb95e1f3 100644
--- a/tools/lib/api/fs/fs.h
+++ b/tools/lib/api/fs/fs.h
@@ -28,6 +28,8 @@ FS(bpf_fs)
#undef FS
+int cgroupfs_find_mountpoint(char *buf, size_t maxlen, const char *subsys);
+
int filename__read_int(const char *filename, int *value);
int filename__read_ull(const char *filename, unsigned long long *value);
int filename__read_xll(const char *filename, unsigned long long *value);