5 #include <linux/kernel.h>
8 static int debugfs_premounted;
12 static const char *debugfs_known_mountpoints[] = {
18 static int debugfs_found;
30 ptr = debugfs_known_mountpoints;
41 fp = fopen(
"/proc/mounts",
"r");
45 while (fscanf(fp,
"%*s %" STR(
PATH_MAX)
"s %99s %*s %*d %*d\n",
47 if (
strcmp(type,
"debugfs") == 0)
52 if (
strcmp(type,
"debugfs") != 0)
66 if (
statfs(debugfs, &st_fs) < 0)
74 static void debugfs_set_tracing_events_path(
const char *mountpoint)
77 mountpoint,
"tracing/events");
86 debugfs_premounted = 1;
91 if (mountpoint ==
NULL) {
95 if (mountpoint ==
NULL)
96 mountpoint =
"/sys/kernel/debug";
113 debugfs_set_tracing_events_path(mountpoint);