X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fdccp%2Fsysctl.c;h=21295993fdb84f2dd53dea972b137eb95395aca2;hb=ad619800e4e034cad44299b2a22df9eebb043ac3;hp=c62c05039f693e40bbd2b4cad307fa68d619629f;hpb=95b00786f3b8fa99f53931361beeb4c10504ad87;p=linux-2.6 diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index c62c05039f..21295993fd 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c @@ -100,41 +100,19 @@ static struct ctl_table dccp_default_table[] = { { .ctl_name = 0, } }; -static struct ctl_table dccp_table[] = { - { - .ctl_name = NET_DCCP_DEFAULT, - .procname = "default", - .mode = 0555, - .child = dccp_default_table, - }, - { .ctl_name = 0, }, -}; - -static struct ctl_table dccp_dir_table[] = { - { - .ctl_name = NET_DCCP, - .procname = "dccp", - .mode = 0555, - .child = dccp_table, - }, - { .ctl_name = 0, }, -}; - -static struct ctl_table dccp_root_table[] = { - { - .ctl_name = CTL_NET, - .procname = "net", - .mode = 0555, - .child = dccp_dir_table, - }, - { .ctl_name = 0, }, +static struct ctl_path dccp_path[] = { + { .procname = "net", .ctl_name = CTL_NET, }, + { .procname = "dccp", .ctl_name = NET_DCCP, }, + { .procname = "default", .ctl_name = NET_DCCP_DEFAULT, }, + { } }; static struct ctl_table_header *dccp_table_header; int __init dccp_sysctl_init(void) { - dccp_table_header = register_sysctl_table(dccp_root_table); + dccp_table_header = register_sysctl_paths(dccp_path, + dccp_default_table); return dccp_table_header != NULL ? 0 : -ENOMEM; }