analyze: check both possible mount points of tracefs

Let's try the new one first, the old one second.
This commit is contained in:
Lennart Poettering 2019-03-28 09:59:24 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent bd169c2be0
commit 196f306795

View File

@ -1519,9 +1519,15 @@ static int load_kernel_syscalls(Set **ret) {
/* Let's read the available system calls from the list of available tracing events. Slightly dirty, but good /* Let's read the available system calls from the list of available tracing events. Slightly dirty, but good
* enough for analysis purposes. */ * enough for analysis purposes. */
f = fopen("/sys/kernel/debug/tracing/available_events", "re"); f = fopen("/sys/kernel/tracing/available_events", "re");
if (!f) if (!f) {
return log_full_errno(IN_SET(errno, EPERM, EACCES, ENOENT) ? LOG_DEBUG : LOG_WARNING, errno, "Can't read open /sys/kernel/debug/tracing/available_events: %m"); /* We tried the non-debugfs mount point and that didn't work. If it wasn't mounted, maybe the
* old debugfs mount point works? */
f = fopen("/sys/kernel/debug/tracing/available_events", "re");
if (!f)
return log_full_errno(IN_SET(errno, EPERM, EACCES, ENOENT) ? LOG_DEBUG : LOG_WARNING, errno,
"Can't read open tracefs' available_events file: %m");
}
for (;;) { for (;;) {
_cleanup_free_ char *line = NULL; _cleanup_free_ char *line = NULL;