From 4605eab3487dc818b1f3cbee2cd139cca3564be7 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Wed, 2 Sep 2015 09:56:43 +0200 Subject: tools lib api fs: Replace debugfs/tracefs objects interface with fs.c Switching to the fs.c related filesystem framework. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Raphael Beamonte Cc: Steven Rostedt Link: http://lkml.kernel.org/r/1441180605-24737-14-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/api/fs/fs.c | 1 - tools/lib/api/fs/tracing_path.c | 15 +++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'tools/lib/api') diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c index 8afe08a99bc6..791509346178 100644 --- a/tools/lib/api/fs/fs.c +++ b/tools/lib/api/fs/fs.c @@ -11,7 +11,6 @@ #include #include -#include "debugfs.h" #include "fs.h" #define _STR(x) #x diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c index 1e0bb0da5e4f..38aca2dd1946 100644 --- a/tools/lib/api/fs/tracing_path.c +++ b/tools/lib/api/fs/tracing_path.c @@ -7,8 +7,7 @@ #include #include #include -#include "debugfs.h" -#include "tracefs.h" +#include "fs.h" #include "tracing_path.h" @@ -29,7 +28,7 @@ static const char *tracing_path_tracefs_mount(void) { const char *mnt; - mnt = tracefs_mount(NULL); + mnt = tracefs__mount(); if (!mnt) return NULL; @@ -42,7 +41,7 @@ static const char *tracing_path_debugfs_mount(void) { const char *mnt; - mnt = debugfs_mount(NULL); + mnt = debugfs__mount(); if (!mnt) return NULL; @@ -96,7 +95,7 @@ static int strerror_open(int err, char *buf, size_t size, const char *filename) * want some tracepoint which wasn't compiled in your kernel. * - jirka */ - if (debugfs_configured() || tracefs_configured()) { + if (debugfs__configured() || tracefs__configured()) { snprintf(buf, size, "Error:\tFile %s/%s not found.\n" "Hint:\tPerhaps this kernel misses some CONFIG_ setting to enable this feature?.\n", @@ -110,13 +109,13 @@ static int strerror_open(int err, char *buf, size_t size, const char *filename) "Hint:\tTry 'sudo mount -t debugfs nodev /sys/kernel/debug'"); break; case EACCES: { - const char *mountpoint = debugfs_find_mountpoint(); + const char *mountpoint = debugfs__mountpoint(); if (!access(mountpoint, R_OK) && strncmp(filename, "tracing/", 8) == 0) { - const char *tracefs_mntpoint = tracefs_find_mountpoint(); + const char *tracefs_mntpoint = tracefs__mountpoint(); if (tracefs_mntpoint) - mountpoint = tracefs_find_mountpoint(); + mountpoint = tracefs__mountpoint(); } snprintf(buf, size, -- cgit v1.2.3-59-g8ed1b