tools lib api fs: Move cgroupsfs_find_mountpoint()
authorNamhyung Kim <namhyung@kernel.org>
Mon, 27 Jan 2020 10:00:31 +0000 (19:00 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 4 Mar 2020 13:34:09 +0000 (10:34 -0300)
commit7982a898515064ba180d958bfc89ed22d13905ee
tree6bdc83844fbf9854fc97c1f155f370636917afb0
parentd46eec8e975a8180e178e01ba505801c44bc9a6c
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>
tools/lib/api/fs/Build
tools/lib/api/fs/cgroup.c [new file with mode: 0644]
tools/lib/api/fs/fs.h
tools/perf/util/cgroup.c