-/*
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
* Copyright (C) 2001 Cluster File Systems, Inc.
*
* This code is issued under the GNU General Public License.
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/sysctl.h>
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
#include <linux/swapctl.h>
+#endif
#include <linux/proc_fs.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <asm/uaccess.h>
#include <linux/utsname.h>
+struct ctl_table_header *ll_table_header = NULL;
-struct ctl_table_header *obdfs_table_header = NULL;
-
-int obdfs_debug_level = 0;
-int obdfs_print_entry = 1;
+int ll_debug_level = 0;
+int ll_print_entry = 1;
-#define OBDFS_SYSCTL 1
+#define LL_SYSCTL 1
-#define OBDFS_DEBUG 1 /* control debugging */
-#define OBDFS_ENTRY 2 /* control enter/leave pattern */
-#define OBDFS_TIMEOUT 3 /* timeout on upcalls to become intrble */
-#define OBDFS_HARD 4 /* mount type "hard" or "soft" */
-#define OBDFS_VARS 5
-#define OBDFS_INDEX 6
-#define OBDFS_RESET 7
+#define LL_DEBUG 1 /* control debugging */
+#define LL_ENTRY 2 /* control enter/leave pattern */
+#define LL_TIMEOUT 3 /* timeout on upcalls to become intrble */
+#define LL_HARD 4 /* mount type "hard" or "soft" */
+#define LL_VARS 5
+#define LL_INDEX 6
+#define LL_RESET 7
-#define OBDFS_VARS_SLOT 2
+#define LL_VARS_SLOT 2
-static ctl_table obdfs_table[] = {
- {OBDFS_DEBUG, "debug", &obdfs_debug_level, sizeof(int), 0644, NULL, &proc_dointvec},
- {OBDFS_ENTRY, "trace", &obdfs_print_entry, sizeof(int), 0644, NULL, &proc_dointvec},
+static ctl_table ll_table[] = {
+ {LL_DEBUG, "debug", &ll_debug_level, sizeof(int), 0644, NULL, &proc_dointvec},
+ {LL_ENTRY, "trace", &ll_print_entry, sizeof(int), 0644, NULL, &proc_dointvec},
{ 0 }
};
static ctl_table top_table[] = {
- {OBDFS_SYSCTL, "obdfs", NULL, 0, 0555, obdfs_table},
+ {LL_SYSCTL, "lustre_light", NULL, 0, 0555, ll_table},
{0}
};
-void obdfs_sysctl_init (void)
+void ll_sysctl_init (void)
{
#ifdef CONFIG_SYSCTL
- if ( !obdfs_table_header )
- obdfs_table_header = register_sysctl_table(top_table, 0);
+ if ( !ll_table_header )
+ ll_table_header = register_sysctl_table(top_table, 0);
#endif
}
-void obdfs_sysctl_clean (void)
+void ll_sysctl_clean (void)
{
#ifdef CONFIG_SYSCTL
- if ( obdfs_table_header )
- unregister_sysctl_table(obdfs_table_header);
- obdfs_table_header = NULL;
+ if ( ll_table_header )
+ unregister_sysctl_table(ll_table_header);
+ ll_table_header = NULL;
#endif
}