mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 11:32:04 +00:00
29c52aa230
Mount debugfs filesystem under '/sys/kernel/debug', if it's not mounted. Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <4B387090.7080407@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
26 lines
702 B
C
26 lines
702 B
C
#ifndef __DEBUGFS_H__
|
|
#define __DEBUGFS_H__
|
|
|
|
#include <sys/mount.h>
|
|
|
|
#ifndef MAX_PATH
|
|
# define MAX_PATH 256
|
|
#endif
|
|
|
|
#ifndef STR
|
|
# define _STR(x) #x
|
|
# define STR(x) _STR(x)
|
|
#endif
|
|
|
|
extern const char *debugfs_find_mountpoint(void);
|
|
extern int debugfs_valid_mountpoint(const char *debugfs);
|
|
extern int debugfs_valid_entry(const char *path);
|
|
extern char *debugfs_mount(const char *mountpoint);
|
|
extern int debugfs_umount(void);
|
|
extern int debugfs_write(const char *entry, const char *value);
|
|
extern int debugfs_read(const char *entry, char *buffer, size_t size);
|
|
extern void debugfs_force_cleanup(void);
|
|
extern int debugfs_make_path(const char *element, char *buffer, int size);
|
|
|
|
#endif /* __DEBUGFS_H__ */
|