Whamcloud - gitweb
A regression test for networking (probably using the echo device).
[fs/lustre-release.git] / lustre / llite / sysctl.c
1 /*
2  * Copyright (C) 2001  Cluster File Systems, Inc.
3  *
4  * This code is issued under the GNU General Public License.
5  * See the file COPYING in this distribution
6  */
7 #include <linux/sched.h>
8 #include <linux/mm.h>
9 #include <linux/sysctl.h>
10 #include <linux/swapctl.h>
11 #include <linux/proc_fs.h>
12 #include <linux/slab.h>
13 #include <linux/stat.h>
14 #include <linux/ctype.h>
15 #include <asm/bitops.h>
16 #include <asm/segment.h>
17 #include <asm/uaccess.h>
18 #include <linux/utsname.h>
19
20 struct ctl_table_header *ll_table_header = NULL;
21
22 int ll_debug_level = 0;
23 int ll_print_entry = 1;
24
25
26 #define LL_SYSCTL 1
27
28 #define LL_DEBUG            1       /* control debugging */
29 #define LL_ENTRY            2       /* control enter/leave pattern */
30 #define LL_TIMEOUT         3       /* timeout on upcalls to become intrble */
31 #define LL_HARD            4       /* mount type "hard" or "soft" */
32 #define LL_VARS            5       
33 #define LL_INDEX           6
34 #define LL_RESET           7
35
36 #define LL_VARS_SLOT       2
37
38 static ctl_table ll_table[] = {
39         {LL_DEBUG, "debug", &ll_debug_level, sizeof(int), 0644, NULL, &proc_dointvec},
40         {LL_ENTRY, "trace", &ll_print_entry, sizeof(int), 0644, NULL, &proc_dointvec},
41         { 0 }
42 };
43
44 static ctl_table top_table[] = {
45        {LL_SYSCTL, "lustre_light",    NULL, 0, 0555, ll_table},
46        {0}
47 };
48
49 void ll_sysctl_init (void)
50 {
51
52 #ifdef CONFIG_SYSCTL
53         if ( !ll_table_header )
54                 ll_table_header = register_sysctl_table(top_table, 0); 
55 #endif
56 }
57
58 void ll_sysctl_clean (void)
59 {
60 #ifdef CONFIG_SYSCTL
61         if ( ll_table_header )
62                 unregister_sysctl_table(ll_table_header);
63         ll_table_header = NULL;
64 #endif
65 }