aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/api/fs/tracing_path.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-09-02 03:56:43 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-14 11:50:15 -0400
commit4605eab3487dc818b1f3cbee2cd139cca3564be7 (patch)
treeb63bdd5ed951159c06f29877af81cc41294e2afd /tools/lib/api/fs/tracing_path.c
parent4f234f06d608635a1cff936131285a91af213b37 (diff)
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 <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Raphael Beamonte <raphael.beamonte@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1441180605-24737-14-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
-rw-r--r--tools/lib/api/fs/tracing_path.c15
1 files changed, 7 insertions, 8 deletions
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 @@
7#include <string.h> 7#include <string.h>
8#include <errno.h> 8#include <errno.h>
9#include <unistd.h> 9#include <unistd.h>
10#include "debugfs.h" 10#include "fs.h"
11#include "tracefs.h"
12 11
13#include "tracing_path.h" 12#include "tracing_path.h"
14 13
@@ -29,7 +28,7 @@ static const char *tracing_path_tracefs_mount(void)
29{ 28{
30 const char *mnt; 29 const char *mnt;
31 30
32 mnt = tracefs_mount(NULL); 31 mnt = tracefs__mount();
33 if (!mnt) 32 if (!mnt)
34 return NULL; 33 return NULL;
35 34
@@ -42,7 +41,7 @@ static const char *tracing_path_debugfs_mount(void)
42{ 41{
43 const char *mnt; 42 const char *mnt;
44 43
45 mnt = debugfs_mount(NULL); 44 mnt = debugfs__mount();
46 if (!mnt) 45 if (!mnt)
47 return NULL; 46 return NULL;
48 47
@@ -96,7 +95,7 @@ static int strerror_open(int err, char *buf, size_t size, const char *filename)
96 * want some tracepoint which wasn't compiled in your kernel. 95 * want some tracepoint which wasn't compiled in your kernel.
97 * - jirka 96 * - jirka
98 */ 97 */
99 if (debugfs_configured() || tracefs_configured()) { 98 if (debugfs__configured() || tracefs__configured()) {
100 snprintf(buf, size, 99 snprintf(buf, size,
101 "Error:\tFile %s/%s not found.\n" 100 "Error:\tFile %s/%s not found.\n"
102 "Hint:\tPerhaps this kernel misses some CONFIG_ setting to enable this feature?.\n", 101 "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)
110 "Hint:\tTry 'sudo mount -t debugfs nodev /sys/kernel/debug'"); 109 "Hint:\tTry 'sudo mount -t debugfs nodev /sys/kernel/debug'");
111 break; 110 break;
112 case EACCES: { 111 case EACCES: {
113 const char *mountpoint = debugfs_find_mountpoint(); 112 const char *mountpoint = debugfs__mountpoint();
114 113
115 if (!access(mountpoint, R_OK) && strncmp(filename, "tracing/", 8) == 0) { 114 if (!access(mountpoint, R_OK) && strncmp(filename, "tracing/", 8) == 0) {
116 const char *tracefs_mntpoint = tracefs_find_mountpoint(); 115 const char *tracefs_mntpoint = tracefs__mountpoint();
117 116
118 if (tracefs_mntpoint) 117 if (tracefs_mntpoint)
119 mountpoint = tracefs_find_mountpoint(); 118 mountpoint = tracefs__mountpoint();
120 } 119 }
121 120
122 snprintf(buf, size, 121 snprintf(buf, size,