linux-stable/tools/lib/api/fs
Arnaldo Carvalho de Melo ab85785aa1 tools lib api debugfs: Check for tracefs when reporting errors
Now that we have two mountpoints, one for debugfs and another, for
tracefs, we end up needing to check permissions for both, so, on
a system with default config we were always asking the user to
check the permission of the debugfs mountpoint, even when it was
already sufficient. Fix it.

E.g.:

  $ trace -e nanosleep usleep 1
  Error: No permissions to read /sys/kernel/debug/tracing/events/raw_syscalls/sys_(enter|exit)
  Hint:  Try 'sudo mount -o remount,mode=755 /sys/kernel/debug'

  $ sudo mount -o remount,mode=755 /sys/kernel/debug
  $ trace -e nanosleep usleep 1
  Error: No permissions to read /sys/kernel/debug/tracing/events/raw_syscalls/sys_(enter|exit)
  Hint:  Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing'

  $ sudo mount -o remount,mode=755 /sys/kernel/debug/tracing
  $ trace -e nanosleep usleep 1
     0.326 ( 0.061 ms): usleep/11961 nanosleep(rqtp: 0x7ffef1081c50) = 0
  $

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.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>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-0viljeuhc7q84ic8kobsna43@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-07-06 12:22:14 -03:00
..
Build tools lib api: Rename libapikfs.a to libapi.a 2015-02-12 17:55:18 -03:00
debugfs.c tools lib api debugfs: Check for tracefs when reporting errors 2015-07-06 12:22:14 -03:00
debugfs.h tools lib api fs: Add {tracefs,debugfs}_configured() functions 2015-02-07 14:00:10 +01:00
findfs.c tools lib fs: Add helper to find mounted file systems 2015-02-07 13:51:34 +01:00
findfs.h tools lib api fs: Add {tracefs,debugfs}_configured() functions 2015-02-07 14:00:10 +01:00
fs.c perf tools: Fix statfs.f_type data type mismatch build error with uclibc 2015-01-16 17:49:29 -03:00
fs.h tools lib fs: Add sysctl__read_int helper 2014-12-11 17:53:00 -03:00
tracefs.c tools lib api fs: Add {tracefs,debugfs}_configured() functions 2015-02-07 14:00:10 +01:00
tracefs.h tools lib api fs: Add {tracefs,debugfs}_configured() functions 2015-02-07 14:00:10 +01:00