]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IPV4]: Make __devinet_sysctl_register return an error
authorPavel Emelyanov <xemul@openvz.org>
Sun, 16 Dec 2007 21:30:07 +0000 (13:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:58:09 +0000 (14:58 -0800)
Currently, this function is void, so failures in creating
sysctls for new/renamed devices are not reported to anywhere.

Fixing this is another complex (needed?) task, but this
return value is needed during the namespaces creation to
handle the case, when we failed to create "all" and "default"
entries.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/devinet.c

index 2dc2f7ed6bbebcc06e70994f77aa92fe69abb69f..82def2c1c65050db75ea0a7163d00d0bfa72582c 100644 (file)
@@ -1454,8 +1454,8 @@ static struct devinet_sysctl_table {
        },
 };
 
-static void __devinet_sysctl_register(char *dev_name, int ctl_name,
-               struct ipv4_devconf *p)
+static int __devinet_sysctl_register(struct net *net, char *dev_name,
+               int ctl_name, struct ipv4_devconf *p)
 {
        int i;
        struct devinet_sysctl_table *t;
@@ -1497,14 +1497,14 @@ static void __devinet_sysctl_register(char *dev_name, int ctl_name,
                goto free_procname;
 
        p->sysctl = t;
-       return;
+       return 0;
 
 free_procname:
        kfree(t->dev_name);
 free:
        kfree(t);
 out:
-       return;
+       return -ENOBUFS;
 }
 
 static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf)