Root/
1 | /* |
2 | * Sysctl operations for Coda filesystem |
3 | * Original version: (C) 1996 P. Braam and M. Callahan |
4 | * Rewritten for Linux 2.1. (C) 1997 Carnegie Mellon University |
5 | * |
6 | * Carnegie Mellon encourages users to contribute improvements to |
7 | * the Coda project. Contact Peter Braam (coda@cs.cmu.edu). |
8 | */ |
9 | |
10 | #include <linux/sysctl.h> |
11 | |
12 | #include "coda_int.h" |
13 | |
14 | #ifdef CONFIG_SYSCTL |
15 | static struct ctl_table_header *fs_table_header; |
16 | |
17 | static ctl_table coda_table[] = { |
18 | { |
19 | .procname = "timeout", |
20 | .data = &coda_timeout, |
21 | .maxlen = sizeof(int), |
22 | .mode = 0644, |
23 | .proc_handler = proc_dointvec |
24 | }, |
25 | { |
26 | .procname = "hard", |
27 | .data = &coda_hard, |
28 | .maxlen = sizeof(int), |
29 | .mode = 0644, |
30 | .proc_handler = proc_dointvec |
31 | }, |
32 | { |
33 | .procname = "fake_statfs", |
34 | .data = &coda_fake_statfs, |
35 | .maxlen = sizeof(int), |
36 | .mode = 0600, |
37 | .proc_handler = proc_dointvec |
38 | }, |
39 | {} |
40 | }; |
41 | |
42 | static ctl_table fs_table[] = { |
43 | { |
44 | .procname = "coda", |
45 | .mode = 0555, |
46 | .child = coda_table |
47 | }, |
48 | {} |
49 | }; |
50 | |
51 | void coda_sysctl_init(void) |
52 | { |
53 | if ( !fs_table_header ) |
54 | fs_table_header = register_sysctl_table(fs_table); |
55 | } |
56 | |
57 | void coda_sysctl_clean(void) |
58 | { |
59 | if ( fs_table_header ) { |
60 | unregister_sysctl_table(fs_table_header); |
61 | fs_table_header = NULL; |
62 | } |
63 | } |
64 | |
65 | #else |
66 | void coda_sysctl_init(void) |
67 | { |
68 | } |
69 | |
70 | void coda_sysctl_clean(void) |
71 | { |
72 | } |
73 | #endif |
74 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9