Skip to content

Commit

Permalink
9p: Don't use binary sysctl numbers.
Browse files Browse the repository at this point in the history
The recent 9p commit: bd238fb 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>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Jul 22, 2007
1 parent f56d35e commit b053c20
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions net/9p/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,45 +28,40 @@
#include <linux/init.h>
#include <net/9p/9p.h>

enum {
P9_SYSCTL_NET = 487,
P9_SYSCTL_DEBUG = 1,
};

static ctl_table p9_table[] = {
static struct ctl_table p9_table[] = {
#ifdef CONFIG_NET_9P_DEBUG
{
.ctl_name = P9_SYSCTL_DEBUG,
.ctl_name = CTL_UNNUMBERED,
.procname = "debug",
.data = &p9_debug_level,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
#endif
{ .ctl_name = 0 },
{},
};

static ctl_table p9_net_table[] = {
static struct ctl_table p9_net_table[] = {
{
.ctl_name = P9_SYSCTL_NET,
.ctl_name = CTL_UNNUMBERED,
.procname = "9p",
.maxlen = 0,
.mode = 0555,
.child = p9_table,
},
{ .ctl_name = 0 },
{},
};

static ctl_table p9_ctl_table[] = {
static struct ctl_table p9_ctl_table[] = {
{
.ctl_name = CTL_NET,
.procname = "net",
.maxlen = 0,
.mode = 0555,
.child = p9_net_table,
},
{ .ctl_name = 0 },
{},
};

static struct ctl_table_header *p9_table_header;
Expand Down

0 comments on commit b053c20

Please sign in to comment.