0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _DEBUGFS_INTERNAL_H_
0009 #define _DEBUGFS_INTERNAL_H_
0010
0011 struct file_operations;
0012
0013
0014 extern const struct file_operations debugfs_noop_file_operations;
0015 extern const struct file_operations debugfs_open_proxy_file_operations;
0016 extern const struct file_operations debugfs_full_proxy_file_operations;
0017
0018 struct debugfs_fsdata {
0019 const struct file_operations *real_fops;
0020 refcount_t active_users;
0021 struct completion active_users_drained;
0022 };
0023
0024
0025
0026
0027
0028
0029
0030 #define DEBUGFS_FSDATA_IS_REAL_FOPS_BIT BIT(0)
0031
0032
0033 #define DEBUGFS_ALLOW_API BIT(0)
0034 #define DEBUGFS_ALLOW_MOUNT BIT(1)
0035
0036 #ifdef CONFIG_DEBUG_FS_ALLOW_ALL
0037 #define DEFAULT_DEBUGFS_ALLOW_BITS (DEBUGFS_ALLOW_MOUNT | DEBUGFS_ALLOW_API)
0038 #endif
0039 #ifdef CONFIG_DEBUG_FS_DISALLOW_MOUNT
0040 #define DEFAULT_DEBUGFS_ALLOW_BITS (DEBUGFS_ALLOW_API)
0041 #endif
0042 #ifdef CONFIG_DEBUG_FS_ALLOW_NONE
0043 #define DEFAULT_DEBUGFS_ALLOW_BITS (0)
0044 #endif
0045
0046 #endif