x86_64: fix typo in acpi_pm.c
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / net / 9p / sysctl.c
blobe7fe706ab95a7cb4023b8fccfa81a2db75d0d7f0
1 /*
2 * net/9p/sysctl.c
4 * 9P sysctl interface
6 * Copyright (C) 2007 by Latchesar Ionkov <lucho@ionkov.net>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to:
19 * Free Software Foundation
20 * 51 Franklin Street, Fifth Floor
21 * Boston, MA 02111-1301 USA
25 #include <linux/kernel.h>
26 #include <linux/mm.h>
27 #include <linux/sysctl.h>
28 #include <linux/init.h>
29 #include <net/9p/9p.h>
31 enum {
32 P9_SYSCTL_NET = 487,
33 P9_SYSCTL_DEBUG = 1,
36 static ctl_table p9_table[] = {
37 #ifdef CONFIG_NET_9P_DEBUG
39 .ctl_name = P9_SYSCTL_DEBUG,
40 .procname = "debug",
41 .data = &p9_debug_level,
42 .maxlen = sizeof(int),
43 .mode = 0644,
44 .proc_handler = &proc_dointvec
46 #endif
47 { .ctl_name = 0 },
50 static ctl_table p9_net_table[] = {
52 .ctl_name = P9_SYSCTL_NET,
53 .procname = "9p",
54 .maxlen = 0,
55 .mode = 0555,
56 .child = p9_table,
58 { .ctl_name = 0 },
61 static ctl_table p9_ctl_table[] = {
63 .ctl_name = CTL_NET,
64 .procname = "net",
65 .maxlen = 0,
66 .mode = 0555,
67 .child = p9_net_table,
69 { .ctl_name = 0 },
72 static struct ctl_table_header *p9_table_header;
74 int __init p9_sysctl_register(void)
76 p9_table_header = register_sysctl_table(p9_ctl_table);
77 if (!p9_table_header)
78 return -ENOMEM;
80 return 0;
83 void __exit p9_sysctl_unregister(void)
85 unregister_sysctl_table(p9_table_header);