patch-2.1.74 linux/fs/ntfs/sysctl.c
Next file: linux/fs/ntfs/sysctl.h
Previous file: linux/fs/ntfs/support.h
Back to the patch index
Back to the overall index
- Lines: 63
- Date:
Fri Dec 19 15:24:21 1997
- Orig file:
v2.1.73/linux/fs/ntfs/sysctl.c
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.1.73/linux/fs/ntfs/sysctl.c linux/fs/ntfs/sysctl.c
@@ -0,0 +1,62 @@
+/*
+ * sysctl.c
+ * System control stuff
+ *
+ * Copyright (C) 1997 Martin von Löwis
+ * Copyright (C) 1997 Régis Duchesne
+ *
+ */
+
+#include "sysctl.h"
+
+#ifdef DEBUG
+#include <linux/locks.h>
+#include <linux/sysctl.h>
+
+int ntdebug = 0;
+
+/* Add or remove the debug sysctl
+ * Is this really the only file system with sysctls ?
+ */
+void ntfs_sysctl(int add)
+{
+#define FS_NTFS 1
+ /* Definition of the sysctl */
+ static ctl_table ntfs_sysctls[]={
+ {FS_NTFS, /* ID */
+ "ntfs-debug", /* name in /proc */
+ &ntdebug,sizeof(ntdebug), /* data ptr, data size */
+ 0644, /* mode */
+ 0, /* child */
+ proc_dointvec, /* proc handler */
+ 0, /* strategy */
+ 0, /* proc control block */
+ 0,0}, /* extra */
+ {0}
+ };
+ /* Define the parent file : /proc/sys/fs */
+ static ctl_table sysctls_root[]={
+ {CTL_FS,
+ "fs",
+ NULL,0,
+ 0555,
+ ntfs_sysctls},
+ {0}
+ };
+ static struct ctl_table_header *sysctls_root_header = NULL;
+
+ if(add){
+ if(!sysctls_root_header)
+ sysctls_root_header = register_sysctl_table(sysctls_root, 0);
+ } else if(sysctls_root_header) {
+ unregister_sysctl_table(sysctls_root_header);
+ sysctls_root_header = NULL;
+ }
+}
+#endif /* DEBUG */
+
+/*
+ * Local variables:
+ * c-file-style: "linux"
+ * End:
+ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov