123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifdef DEBUG
- #include <linux/module.h>
- #ifdef CONFIG_SYSCTL
- #include <linux/proc_fs.h>
- #include <linux/sysctl.h>
- #include "sysctl.h"
- #include "debug.h"
- static struct ctl_table ntfs_sysctls[] = {
- {
- .procname = "ntfs-debug",
- .data = &debug_msgs,
- .maxlen = sizeof(debug_msgs),
- .mode = 0644,
- .proc_handler = proc_dointvec
- },
- {}
- };
- static struct ctl_table sysctls_root[] = {
- {
- .procname = "fs",
- .mode = 0555,
- .child = ntfs_sysctls
- },
- {}
- };
- static struct ctl_table_header *sysctls_root_table;
- int ntfs_sysctl(int add)
- {
- if (add) {
- BUG_ON(sysctls_root_table);
- sysctls_root_table = register_sysctl_table(sysctls_root);
- if (!sysctls_root_table)
- return -ENOMEM;
- } else {
- BUG_ON(!sysctls_root_table);
- unregister_sysctl_table(sysctls_root_table);
- sysctls_root_table = NULL;
- }
- return 0;
- }
- #endif
- #endif
|