Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[deliverable/linux.git] / fs / coda / sysctl.c
CommitLineData
1da177e4
LT
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).
1da177e4
LT
8 */
9
1da177e4 10#include <linux/sysctl.h>
1da177e4 11
3cf01f28 12#include "coda_int.h"
1da177e4
LT
13
14static struct ctl_table_header *fs_table_header;
15
1da177e4 16static ctl_table coda_table[] = {
fd6065b4
EB
17 {
18 .ctl_name = CTL_UNNUMBERED,
19 .procname = "timeout",
20 .data = &coda_timeout,
21 .maxlen = sizeof(int),
22 .mode = 0644,
23 .proc_handler = &proc_dointvec
24 },
25 {
26 .ctl_name = CTL_UNNUMBERED,
27 .procname = "hard",
28 .data = &coda_hard,
29 .maxlen = sizeof(int),
30 .mode = 0644,
31 .proc_handler = &proc_dointvec
32 },
fd6065b4
EB
33 {
34 .ctl_name = CTL_UNNUMBERED,
35 .procname = "fake_statfs",
36 .data = &coda_fake_statfs,
37 .maxlen = sizeof(int),
38 .mode = 0600,
39 .proc_handler = &proc_dointvec
40 },
41 {}
1da177e4
LT
42};
43
44static ctl_table fs_table[] = {
fd6065b4
EB
45 {
46 .ctl_name = CTL_UNNUMBERED,
47 .procname = "coda",
48 .mode = 0555,
49 .child = coda_table
50 },
51 {}
1da177e4
LT
52};
53
54
1da177e4
LT
55void coda_sysctl_init(void)
56{
1da177e4
LT
57#ifdef CONFIG_SYSCTL
58 if ( !fs_table_header )
0b4d4147 59 fs_table_header = register_sysctl_table(fs_table);
3cf01f28 60#endif
1da177e4
LT
61}
62
3cf01f28 63void coda_sysctl_clean(void)
1da177e4 64{
1da177e4
LT
65#ifdef CONFIG_SYSCTL
66 if ( fs_table_header ) {
67 unregister_sysctl_table(fs_table_header);
68 fs_table_header = NULL;
69 }
70#endif
1da177e4 71}
This page took 0.245988 seconds and 5 git commands to generate.