libtracefs: Have tracefs_{tracing,debug}_dir() mount {tracefs,debugfs} if not mounted
PATCH 1/1 libtracefs: Have tracefs_{tracing,debug}_dir() mount {tracefs,debugfs} if not mounted
From: "Steven Rostedt (Google)" <[email protected]>
tracefs_tracing_dir() and tracefs_debug_dir() would try to mount the directories if they were not already mounted. But this broke, fix it.
Reported-by Bean Huo <[email protected]>
Fixes 7c2b882ed1 ("libtracefs: Add tracefs_tracing_dir_is_mounted() API")
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- src/tracefs-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/tracefs-utils.c +2 -2
@@ -245,7 +245,7 @@ const char *tracefs_tracing_dir(void)if (tracing_dir)return tracing_dir; - tracing_dir =trace_find_tracing_dir (false); + tracing_dir =find_tracing_dir (false, true);return tracing_dir; }
@@ -263,7 +263,7 @@ const char *tracefs_debug_dir(void)if (debug_dir)return debug_dir; - debug_dir =trace_find_tracing_dir (true); + debug_dir =find_tracing_dir (true, true);return debug_dir; }
Signature · 1 line
2.35.1