xref: /OK3568_Linux_fs/kernel/tools/lib/api/fs/tracing_path.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef __API_FS_TRACING_PATH_H
3*4882a593Smuzhiyun #define __API_FS_TRACING_PATH_H
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #include <linux/types.h>
6*4882a593Smuzhiyun #include <dirent.h>
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun DIR *tracing_events__opendir(void);
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun void tracing_path_set(const char *mountpoint);
11*4882a593Smuzhiyun const char *tracing_path_mount(void);
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun char *get_tracing_file(const char *name);
14*4882a593Smuzhiyun void put_tracing_file(char *file);
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun char *get_events_file(const char *name);
17*4882a593Smuzhiyun void put_events_file(char *file);
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun #define zput_events_file(ptr) ({ free(*ptr); *ptr = NULL; })
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun int tracing_path__strerror_open_tp(int err, char *buf, size_t size, const char *sys, const char *name);
22*4882a593Smuzhiyun #endif /* __API_FS_TRACING_PATH_H */
23