0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifdef DEBUG
0011
0012 #include <linux/module.h>
0013
0014 #ifdef CONFIG_SYSCTL
0015
0016 #include <linux/proc_fs.h>
0017 #include <linux/sysctl.h>
0018
0019 #include "sysctl.h"
0020 #include "debug.h"
0021
0022
0023 static struct ctl_table ntfs_sysctls[] = {
0024 {
0025 .procname = "ntfs-debug",
0026 .data = &debug_msgs,
0027 .maxlen = sizeof(debug_msgs),
0028 .mode = 0644,
0029 .proc_handler = proc_dointvec
0030 },
0031 {}
0032 };
0033
0034
0035 static struct ctl_table sysctls_root[] = {
0036 {
0037 .procname = "fs",
0038 .mode = 0555,
0039 .child = ntfs_sysctls
0040 },
0041 {}
0042 };
0043
0044
0045 static struct ctl_table_header *sysctls_root_table;
0046
0047
0048
0049
0050
0051
0052
0053 int ntfs_sysctl(int add)
0054 {
0055 if (add) {
0056 BUG_ON(sysctls_root_table);
0057 sysctls_root_table = register_sysctl_table(sysctls_root);
0058 if (!sysctls_root_table)
0059 return -ENOMEM;
0060 } else {
0061 BUG_ON(!sysctls_root_table);
0062 unregister_sysctl_table(sysctls_root_table);
0063 sysctls_root_table = NULL;
0064 }
0065 return 0;
0066 }
0067
0068 #endif
0069 #endif