aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/api/fs/tracing_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
-rw-r--r--tools/lib/api/fs/tracing_path.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c
index 9cd282425929..9b451af0721c 100644
--- a/tools/lib/api/fs/tracing_path.c
+++ b/tools/lib/api/fs/tracing_path.c
@@ -101,6 +101,19 @@ void put_events_file(char *file)
101 free(file); 101 free(file);
102} 102}
103 103
104DIR *tracing_events__opendir(void)
105{
106 DIR *dir = NULL;
107 char *path = get_tracing_file("events");
108
109 if (path) {
110 dir = opendir(path);
111 put_events_file(path);
112 }
113
114 return dir;
115}
116
104int tracing_path__strerror_open_tp(int err, char *buf, size_t size, 117int tracing_path__strerror_open_tp(int err, char *buf, size_t size,
105 const char *sys, const char *name) 118 const char *sys, const char *name)
106{ 119{