summaryrefslogtreecommitdiffstats
path: root/net/unix/sysctl_net_unix.c
diff options
context:
space:
mode:
authorPavel Emelyanov2007-12-01 13:40:40 +0100
committerDavid S. Miller2008-01-28 23:55:21 +0100
commit97577e38284f48ca773392e2d401af2f6c95dc08 (patch)
treef744e46259cf06b13858f2965526d512308cb7da /net/unix/sysctl_net_unix.c
parent[DECNET]: Remove extra memset from dn_fib_check_nh (diff)
downloadkernel-qcow2-linux-97577e38284f48ca773392e2d401af2f6c95dc08.tar.gz
kernel-qcow2-linux-97577e38284f48ca773392e2d401af2f6c95dc08.tar.xz
kernel-qcow2-linux-97577e38284f48ca773392e2d401af2f6c95dc08.zip
[UNIX]: Extend unix_sysctl_(un)register prototypes
Add the struct net * argument to both of them to use in the future. Also make the register one return an error code. It is useless right now, but will make the future patches much simpler. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
-rw-r--r--net/unix/sysctl_net_unix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
index eb0bd57ebada..b2e0407e1b7b 100644
--- a/net/unix/sysctl_net_unix.c
+++ b/net/unix/sysctl_net_unix.c
@@ -48,12 +48,13 @@ static ctl_table unix_root_table[] = {
static struct ctl_table_header * unix_sysctl_header;
-void unix_sysctl_register(void)
+int unix_sysctl_register(struct net *net)
{
unix_sysctl_header = register_sysctl_table(unix_root_table);
+ return unix_sysctl_header == NULL ? -ENOMEM : 0;
}
-void unix_sysctl_unregister(void)
+void unix_sysctl_unregister(struct net *net)
{
unregister_sysctl_table(unix_sysctl_header);
}