1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2001 Cluster File Systems, Inc.
6 * This code is issued under the GNU General Public License.
7 * See the file COPYING in this distribution
9 #include <linux/sched.h>
11 #include <linux/sysctl.h>
12 #include <linux/version.h>
13 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
14 #include <linux/swapctl.h>
16 #include <linux/proc_fs.h>
17 #include <linux/slab.h>
18 #include <linux/stat.h>
19 #include <linux/ctype.h>
20 #include <asm/bitops.h>
21 #include <asm/segment.h>
22 #include <asm/uaccess.h>
23 #include <linux/utsname.h>
25 struct ctl_table_header *ll_table_header = NULL;
27 int ll_debug_level = 0;
28 int ll_print_entry = 1;
33 #define LL_DEBUG 1 /* control debugging */
34 #define LL_ENTRY 2 /* control enter/leave pattern */
35 #define LL_TIMEOUT 3 /* timeout on upcalls to become intrble */
36 #define LL_HARD 4 /* mount type "hard" or "soft" */
41 #define LL_VARS_SLOT 2
43 static ctl_table ll_table[] = {
44 {LL_DEBUG, "debug", &ll_debug_level, sizeof(int), 0644, NULL, &proc_dointvec},
45 {LL_ENTRY, "trace", &ll_print_entry, sizeof(int), 0644, NULL, &proc_dointvec},
49 static ctl_table top_table[] = {
50 {LL_SYSCTL, "lustre_light", NULL, 0, 0555, ll_table},
54 void ll_sysctl_init (void)
58 if ( !ll_table_header )
59 ll_table_header = register_sysctl_table(top_table, 0);
63 void ll_sysctl_clean (void)
66 if ( ll_table_header )
67 unregister_sysctl_table(ll_table_header);
68 ll_table_header = NULL;