mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-11 11:59:33 +01:00
We don't need to have two PATH_MAX char sized arrays holding it, just one in util/debugfs.c will do. Also rename debugfs_path to tracing_events_path, as it is not the path to debugfs, that is debugfs_mountpoint. Both are now accessible. This will allow accessing this code in the perf python binding without having to drag in perf.c and util/parse-events.c. The defaults for these variables are the canonical "/sys/kernel/debug" and "/sys/kernel/debug/tracing/events/", removing the need for simple tools to call debugfs_mount(NULL). Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
19 lines
621 B
C
19 lines
621 B
C
#ifndef __DEBUGFS_H__
|
|
#define __DEBUGFS_H__
|
|
|
|
const char *debugfs_find_mountpoint(void);
|
|
int debugfs_valid_mountpoint(const char *debugfs);
|
|
int debugfs_valid_entry(const char *path);
|
|
char *debugfs_mount(const char *mountpoint);
|
|
int debugfs_umount(void);
|
|
void debugfs_set_path(const char *mountpoint);
|
|
int debugfs_write(const char *entry, const char *value);
|
|
int debugfs_read(const char *entry, char *buffer, size_t size);
|
|
void debugfs_force_cleanup(void);
|
|
int debugfs_make_path(const char *element, char *buffer, int size);
|
|
|
|
extern char debugfs_mountpoint[];
|
|
extern char tracing_events_path[];
|
|
|
|
#endif /* __DEBUGFS_H__ */
|