This source file includes following definitions.
- ntfs_sysctl
1
2
3
4
5
6
7
8
9
10 #ifdef DEBUG
11
12 #include <linux/module.h>
13
14 #ifdef CONFIG_SYSCTL
15
16 #include <linux/proc_fs.h>
17 #include <linux/sysctl.h>
18
19 #include "sysctl.h"
20 #include "debug.h"
21
22
23 static struct ctl_table ntfs_sysctls[] = {
24 {
25 .procname = "ntfs-debug",
26 .data = &debug_msgs,
27 .maxlen = sizeof(debug_msgs),
28 .mode = 0644,
29 .proc_handler = proc_dointvec
30 },
31 {}
32 };
33
34
35 static struct ctl_table sysctls_root[] = {
36 {
37 .procname = "fs",
38 .mode = 0555,
39 .child = ntfs_sysctls
40 },
41 {}
42 };
43
44
45 static struct ctl_table_header *sysctls_root_table;
46
47
48
49
50
51
52
53 int ntfs_sysctl(int add)
54 {
55 if (add) {
56 BUG_ON(sysctls_root_table);
57 sysctls_root_table = register_sysctl_table(sysctls_root);
58 if (!sysctls_root_table)
59 return -ENOMEM;
60 } else {
61 BUG_ON(!sysctls_root_table);
62 unregister_sysctl_table(sysctls_root_table);
63 sysctls_root_table = NULL;
64 }
65 return 0;
66 }
67
68 #endif
69 #endif