Linux 2.2.0
[davej-history.git] / fs / ntfs / sysctl.c
blob3ab5137693c141c07db47fb62a5b70cd47512760
1 /*
2 * sysctl.c
3 * System control stuff
5 * Copyright (C) 1997 Martin von Löwis
6 * Copyright (C) 1997 Régis Duchesne
8 */
10 #include "sysctl.h"
12 #ifdef DEBUG
13 #include <linux/locks.h>
14 #include <linux/sysctl.h>
16 int ntdebug = 0;
18 /* Add or remove the debug sysctl
19 * Is this really the only file system with sysctls ?
21 void ntfs_sysctl(int add)
23 #define FS_NTFS 1
24 /* Definition of the sysctl */
25 static ctl_table ntfs_sysctls[]={
26 {FS_NTFS, /* ID */
27 "ntfs-debug", /* name in /proc */
28 &ntdebug,sizeof(ntdebug), /* data ptr, data size */
29 0644, /* mode */
30 0, /* child */
31 proc_dointvec, /* proc handler */
32 0, /* strategy */
33 0, /* proc control block */
34 0,0}, /* extra */
35 {0}
37 /* Define the parent file : /proc/sys/fs */
38 static ctl_table sysctls_root[]={
39 {CTL_FS,
40 "fs",
41 NULL,0,
42 0555,
43 ntfs_sysctls},
44 {0}
46 static struct ctl_table_header *sysctls_root_header = NULL;
48 if(add){
49 if(!sysctls_root_header)
50 sysctls_root_header = register_sysctl_table(sysctls_root, 0);
51 } else if(sysctls_root_header) {
52 unregister_sysctl_table(sysctls_root_header);
53 sysctls_root_header = NULL;
56 #endif /* DEBUG */
59 * Local variables:
60 * c-file-style: "linux"
61 * End: