The requirement to mount debugfs is very old. It originated from a time where it was "fairly new" and was not mounted by distros at the time. These days debugfs gets mounted during boot and more importantly the tracing directory moved out over 10years ago. Don't try to mount debugfs anymore. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- src/include/rt-utils.h | 1 - src/lib/rt-utils.c | 29 ----------------------------- 2 files changed, 30 deletions(-) diff --git a/src/include/rt-utils.h b/src/include/rt-utils.h index f6b3fede06f7b..95964f70a6310 100644 --- a/src/include/rt-utils.h +++ b/src/include/rt-utils.h @@ -12,7 +12,6 @@ int check_privs(void); char *get_debugfileprefix(void); -int mount_debugfs(char *); int get_tracers(char ***); int valid_tracer(char *); diff --git a/src/lib/rt-utils.c b/src/lib/rt-utils.c index 6bbd25a8ba53f..7e96950ef9887 100644 --- a/src/lib/rt-utils.c +++ b/src/lib/rt-utils.c @@ -99,32 +99,6 @@ char *get_debugfileprefix(void) return debugfileprefix; } -int mount_debugfs(char *path) -{ - char *mountpoint = path; - char cmd[MAX_PATH]; - char *prefix; - int ret; - - /* if it's already mounted just return */ - prefix = get_debugfileprefix(); - if (strlen(prefix) != 0) { - info(1, "debugfs mountpoint: %s\n", prefix); - return 0; - } - if (!mountpoint) - mountpoint = "/sys/kernel/debug"; - - sprintf(cmd, "mount -t debugfs debugfs %s", mountpoint); - ret = system(cmd); - if (ret != 0) { - fprintf(stderr, "Error mounting debugfs at %s: %s\n", - mountpoint, strerror(errno)); - return -1; - } - return 0; -} - static char **tracer_list; static char *tracer_buffer; static int num_tracers; @@ -451,9 +425,6 @@ static int trace_file_exists(char *name) static void debugfs_prepare(void) { - if (mount_debugfs(NULL)) - fatal("could not mount debugfs"); - fileprefix = get_debugfileprefix(); if (!trace_file_exists("tracing_enabled") && !trace_file_exists("tracing_on")) -- 2.51.0