summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2022-02-01 17:50:56 -0500
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-02-01 17:50:56 -0500
commit2d0605085f43af718f554b9448dd023cc4e6334d (patch)
treec387533fa92e5de8ecebf06491ab80bf09e66853
parent88fd2a659f8d9e19280f8e9d8333e8a797f6f7bd (diff)
downloadktrace-2d0605085f43af718f554b9448dd023cc4e6334d.tar.gz
ktrace: Failure to read tracefs gives EACCES not EPERM
The error to tell the user they do not have access to read the tracefs file system used EPERM and not EACCES, to know to print that, and because of that, it did not print the proper message. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r--src/ktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ktrace.c b/src/ktrace.c
index 81be866..9603e04 100644
--- a/src/ktrace.c
+++ b/src/ktrace.c
@@ -95,7 +95,7 @@ int main (int argc, char **argv)
tep = tracefs_local_events(NULL);
if (!tep) {
- if (errno == EPERM)
+ if (errno == EACCES)
pdie("Failed to initialize tracing directory.\n"
" You do not have permission to read it");
pdie("Failed to initialize tracing directory");