diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-07-21 14:53:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-22 15:43:28 -0400 |
commit | b053c204edbc82b068fe8cfc809b7f90b885fae0 (patch) | |
tree | 49a7d16c97800fda11801c171c6ba5f36db09b1f /net/9p | |
parent | f56d35e7aa78ac56a93ff43da90e8d90a37a1362 (diff) |
9p: Don't use binary sysctl numbers.
The recent 9p commit: bd238fb431f31989898423c8b6496bc8c4204a86 that
supposedly only moved files also introduced a new 9p sysctl interface
that did not properly register it's sysctl binary numbers.
And since it was only for debugging clearly did not need a binary fast
path in any case. So this patch just remove the binary numbers.
See Documentation/sysctl/ctl_unnumbered.txt for more details.
While I was at it I cleaned up the sysctl initializers a little as
well so there is less to read.
Cc: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/sysctl.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/net/9p/sysctl.c b/net/9p/sysctl.c index e7fe706ab95a..8b61027a24ea 100644 --- a/net/9p/sysctl.c +++ b/net/9p/sysctl.c | |||
@@ -28,15 +28,10 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <net/9p/9p.h> | 29 | #include <net/9p/9p.h> |
30 | 30 | ||
31 | enum { | 31 | static struct ctl_table p9_table[] = { |
32 | P9_SYSCTL_NET = 487, | ||
33 | P9_SYSCTL_DEBUG = 1, | ||
34 | }; | ||
35 | |||
36 | static ctl_table p9_table[] = { | ||
37 | #ifdef CONFIG_NET_9P_DEBUG | 32 | #ifdef CONFIG_NET_9P_DEBUG |
38 | { | 33 | { |
39 | .ctl_name = P9_SYSCTL_DEBUG, | 34 | .ctl_name = CTL_UNNUMBERED, |
40 | .procname = "debug", | 35 | .procname = "debug", |
41 | .data = &p9_debug_level, | 36 | .data = &p9_debug_level, |
42 | .maxlen = sizeof(int), | 37 | .maxlen = sizeof(int), |
@@ -44,21 +39,21 @@ static ctl_table p9_table[] = { | |||
44 | .proc_handler = &proc_dointvec | 39 | .proc_handler = &proc_dointvec |
45 | }, | 40 | }, |
46 | #endif | 41 | #endif |
47 | { .ctl_name = 0 }, | 42 | {}, |
48 | }; | 43 | }; |
49 | 44 | ||
50 | static ctl_table p9_net_table[] = { | 45 | static struct ctl_table p9_net_table[] = { |
51 | { | 46 | { |
52 | .ctl_name = P9_SYSCTL_NET, | 47 | .ctl_name = CTL_UNNUMBERED, |
53 | .procname = "9p", | 48 | .procname = "9p", |
54 | .maxlen = 0, | 49 | .maxlen = 0, |
55 | .mode = 0555, | 50 | .mode = 0555, |
56 | .child = p9_table, | 51 | .child = p9_table, |
57 | }, | 52 | }, |
58 | { .ctl_name = 0 }, | 53 | {}, |
59 | }; | 54 | }; |
60 | 55 | ||
61 | static ctl_table p9_ctl_table[] = { | 56 | static struct ctl_table p9_ctl_table[] = { |
62 | { | 57 | { |
63 | .ctl_name = CTL_NET, | 58 | .ctl_name = CTL_NET, |
64 | .procname = "net", | 59 | .procname = "net", |
@@ -66,7 +61,7 @@ static ctl_table p9_ctl_table[] = { | |||
66 | .mode = 0555, | 61 | .mode = 0555, |
67 | .child = p9_net_table, | 62 | .child = p9_net_table, |
68 | }, | 63 | }, |
69 | { .ctl_name = 0 }, | 64 | {}, |
70 | }; | 65 | }; |
71 | 66 | ||
72 | static struct ctl_table_header *p9_table_header; | 67 | static struct ctl_table_header *p9_table_header; |