diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-01-22 08:52:55 -0500 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-01-22 09:16:31 -0500 |
| commit | 801c67b05f55d0cdafcda9fdcbb3da375b03c192 (patch) | |
| tree | 81b17b41e943adaf08650d3f09d413feeefa66c0 /tools/lib/api | |
| parent | e2726d99645c5fa1fd9abd6353270fde624696f8 (diff) | |
tools lib fs: Pass filename to debugfs__strerror_open
It was hardcoded for one specific tracepoint, leftover from its initial
user: 'perf trace'.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-j1jicvwljy5qx1nah4mkmyke@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/api')
| -rw-r--r-- | tools/lib/api/fs/debugfs.c | 6 | ||||
| -rw-r--r-- | tools/lib/api/fs/debugfs.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib/api/fs/debugfs.c index fb700eed61c2..5e8f3913de43 100644 --- a/tools/lib/api/fs/debugfs.c +++ b/tools/lib/api/fs/debugfs.c | |||
| @@ -100,7 +100,7 @@ out: | |||
| 100 | return debugfs_mountpoint; | 100 | return debugfs_mountpoint; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | int debugfs__strerror_open(int err, char *buf, size_t size) | 103 | int debugfs__strerror_open(int err, char *buf, size_t size, const char *filename) |
| 104 | { | 104 | { |
| 105 | char sbuf[128]; | 105 | char sbuf[128]; |
| 106 | 106 | ||
| @@ -114,9 +114,9 @@ int debugfs__strerror_open(int err, char *buf, size_t size) | |||
| 114 | break; | 114 | break; |
| 115 | case EACCES: | 115 | case EACCES: |
| 116 | snprintf(buf, size, | 116 | snprintf(buf, size, |
| 117 | "Error:\tNo permissions to read %s/tracing/events/raw_syscalls\n" | 117 | "Error:\tNo permissions to read %s/%s\n" |
| 118 | "Hint:\tTry 'sudo mount -o remount,mode=755 %s'\n", | 118 | "Hint:\tTry 'sudo mount -o remount,mode=755 %s'\n", |
| 119 | debugfs_mountpoint, debugfs_mountpoint); | 119 | debugfs_mountpoint, filename, debugfs_mountpoint); |
| 120 | break; | 120 | break; |
| 121 | default: | 121 | default: |
| 122 | snprintf(buf, size, "%s", strerror_r(err, sbuf, sizeof(sbuf))); | 122 | snprintf(buf, size, "%s", strerror_r(err, sbuf, sizeof(sbuf))); |
diff --git a/tools/lib/api/fs/debugfs.h b/tools/lib/api/fs/debugfs.h index afa5043fec61..a1799aecd4d5 100644 --- a/tools/lib/api/fs/debugfs.h +++ b/tools/lib/api/fs/debugfs.h | |||
| @@ -26,6 +26,6 @@ char *debugfs_mount(const char *mountpoint); | |||
| 26 | 26 | ||
| 27 | extern char debugfs_mountpoint[]; | 27 | extern char debugfs_mountpoint[]; |
| 28 | 28 | ||
| 29 | int debugfs__strerror_open(int err, char *buf, size_t size); | 29 | int debugfs__strerror_open(int err, char *buf, size_t size, const char *filename); |
| 30 | 30 | ||
| 31 | #endif /* __API_DEBUGFS_H__ */ | 31 | #endif /* __API_DEBUGFS_H__ */ |
