aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@ericvh-laptop.(none)>2007-10-17 15:35:15 -0400
committerEric Van Hensbergen <ericvh@ericvh-desktop.austin.ibm.com>2007-10-17 15:35:15 -0400
commit982c37cfb6e61c0e64634abc2e305d757c1405b2 (patch)
tree084d81419cde8c6cd807d1a909ff413e5589c2ed
parentfb0466c3ae7f1c73f70072af8fd27ac166908a2f (diff)
9p: remove sysctl
A sysctl method was added to enable and disable debugging levels. After further review, it was decided that there are better approaches to doing this and the sysctl methodology isn't really desirable. This patch removes the sysctl code from 9p. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
-rw-r--r--include/net/9p/9p.h14
-rw-r--r--net/9p/Makefile2
-rw-r--r--net/9p/mod.c9
-rw-r--r--net/9p/sysctl.c81
4 files changed, 0 insertions, 106 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 7a448a30e39b..686425a97b0f 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -415,18 +415,4 @@ int p9_idpool_check(int id, struct p9_idpool *p);
415 415
416int p9_error_init(void); 416int p9_error_init(void);
417int p9_errstr2errno(char *, int); 417int p9_errstr2errno(char *, int);
418
419#ifdef CONFIG_SYSCTL
420int __init p9_sysctl_register(void);
421void __exit p9_sysctl_unregister(void);
422#else
423static inline int p9_sysctl_register(void)
424{
425 return 0;
426}
427static inline void p9_sysctl_unregister(void)
428{
429}
430#endif
431
432#endif /* NET_9P_H */ 418#endif /* NET_9P_H */
diff --git a/net/9p/Makefile b/net/9p/Makefile
index 7b2a67abc0a0..5059bc06f8f3 100644
--- a/net/9p/Makefile
+++ b/net/9p/Makefile
@@ -10,7 +10,5 @@ obj-$(CONFIG_NET_9P_FD) += 9pnet_fd.o
10 fcprint.o \ 10 fcprint.o \
11 util.o \ 11 util.o \
12 12
139pnet-$(CONFIG_SYSCTL) += sysctl.o
14
159pnet_fd-objs := \ 139pnet_fd-objs := \
16 trans_fd.o \ 14 trans_fd.o \
diff --git a/net/9p/mod.c b/net/9p/mod.c
index b8ac0635ad83..41d70f47375d 100644
--- a/net/9p/mod.c
+++ b/net/9p/mod.c
@@ -41,8 +41,6 @@ MODULE_PARM_DESC(debug, "9P debugging level");
41 41
42extern int p9_mux_global_init(void); 42extern int p9_mux_global_init(void);
43extern void p9_mux_global_exit(void); 43extern void p9_mux_global_exit(void);
44extern int p9_sysctl_register(void);
45extern void p9_sysctl_unregister(void);
46 44
47/* 45/*
48 * Dynamic Transport Registration Routines 46 * Dynamic Transport Registration Routines
@@ -118,12 +116,6 @@ static int __init init_p9(void)
118 return ret; 116 return ret;
119 } 117 }
120 118
121 ret = p9_sysctl_register();
122 if (ret) {
123 printk(KERN_WARNING "9p: registering sysctl failed\n");
124 return ret;
125 }
126
127 return ret; 119 return ret;
128} 120}
129 121
@@ -134,7 +126,6 @@ static int __init init_p9(void)
134 126
135static void __exit exit_p9(void) 127static void __exit exit_p9(void)
136{ 128{
137 p9_sysctl_unregister();
138 p9_mux_global_exit(); 129 p9_mux_global_exit();
139} 130}
140 131
diff --git a/net/9p/sysctl.c b/net/9p/sysctl.c
deleted file mode 100644
index 8b61027a24ea..000000000000
--- a/net/9p/sysctl.c
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * net/9p/sysctl.c
3 *
4 * 9P sysctl interface
5 *
6 * Copyright (C) 2007 by Latchesar Ionkov <lucho@ionkov.net>
7 *
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.
11 *
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.
16 *
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
22 *
23 */
24
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>
30
31static struct ctl_table p9_table[] = {
32#ifdef CONFIG_NET_9P_DEBUG
33 {
34 .ctl_name = CTL_UNNUMBERED,
35 .procname = "debug",
36 .data = &p9_debug_level,
37 .maxlen = sizeof(int),
38 .mode = 0644,
39 .proc_handler = &proc_dointvec
40 },
41#endif
42 {},
43};
44
45static struct ctl_table p9_net_table[] = {
46 {
47 .ctl_name = CTL_UNNUMBERED,
48 .procname = "9p",
49 .maxlen = 0,
50 .mode = 0555,
51 .child = p9_table,
52 },
53 {},
54};
55
56static struct ctl_table p9_ctl_table[] = {
57 {
58 .ctl_name = CTL_NET,
59 .procname = "net",
60 .maxlen = 0,
61 .mode = 0555,
62 .child = p9_net_table,
63 },
64 {},
65};
66
67static struct ctl_table_header *p9_table_header;
68
69int __init p9_sysctl_register(void)
70{
71 p9_table_header = register_sysctl_table(p9_ctl_table);
72 if (!p9_table_header)
73 return -ENOMEM;
74
75 return 0;
76}
77
78void __exit p9_sysctl_unregister(void)
79{
80 unregister_sysctl_table(p9_table_header);
81}