return debugfs_mountpoint;
}
-int debugfs__strerror_open(int err, char *buf, size_t size)
+int debugfs__strerror_open(int err, char *buf, size_t size, const char *filename)
{
char sbuf[128];
break;
case EACCES:
snprintf(buf, size,
- "Error:\tNo permissions to read %s/tracing/events/raw_syscalls\n"
+ "Error:\tNo permissions to read %s/%s\n"
"Hint:\tTry 'sudo mount -o remount,mode=755 %s'\n",
- debugfs_mountpoint, debugfs_mountpoint);
+ debugfs_mountpoint, filename, debugfs_mountpoint);
break;
default:
snprintf(buf, size, "%s", strerror_r(err, sbuf, sizeof(sbuf)));
extern char debugfs_mountpoint[];
-int debugfs__strerror_open(int err, char *buf, size_t size);
+int debugfs__strerror_open(int err, char *buf, size_t size, const char *filename);
#endif /* __API_DEBUGFS_H__ */
if (trace->trace_syscalls &&
perf_evlist__add_syscall_newtp(evlist, trace__sys_enter,
trace__sys_exit))
- goto out_error_tp;
+ goto out_error_raw_syscalls;
if (trace->trace_syscalls)
perf_evlist__add_vfs_getname(evlist);
char errbuf[BUFSIZ];
out_error_tp:
- debugfs__strerror_open(errno, errbuf, sizeof(errbuf));
+out_error_raw_syscalls:
+ debugfs__strerror_open(errno, errbuf, sizeof(errbuf), "tracing/events/raw_syscalls");
goto out_error;
out_error_mmap: