diff options
Diffstat (limited to 'tools/perf/builtin-ftrace.c')
-rw-r--r-- | tools/perf/builtin-ftrace.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 01a5bb58eb04..1367bb5046a7 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -284,7 +284,13 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv) }; if (!perf_cap__capable(CAP_SYS_ADMIN)) { - pr_err("ftrace only works for root!\n"); + pr_err("ftrace only works for %s!\n", +#ifdef HAVE_LIBCAP_SUPPORT + "users with the SYS_ADMIN capability" +#else + "root" +#endif + ); return -1; } |