aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-12-16 16:30:07 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:58:09 -0500
commitea40b324d791d86a42b858d073007de4d133227e (patch)
tree0fa2465408c90f18afafecef1ed9565f77ef3496 /net/ipv4/devinet.c
parent8afd351c772d1815347d5c46716b099fde00a579 (diff)
[IPV4]: Make __devinet_sysctl_register return an error
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>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 2dc2f7ed6bbe..82def2c1c650 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1454,8 +1454,8 @@ static struct devinet_sysctl_table {
1454 }, 1454 },
1455}; 1455};
1456 1456
1457static void __devinet_sysctl_register(char *dev_name, int ctl_name, 1457static int __devinet_sysctl_register(struct net *net, char *dev_name,
1458 struct ipv4_devconf *p) 1458 int ctl_name, struct ipv4_devconf *p)
1459{ 1459{
1460 int i; 1460 int i;
1461 struct devinet_sysctl_table *t; 1461 struct devinet_sysctl_table *t;
@@ -1497,14 +1497,14 @@ static void __devinet_sysctl_register(char *dev_name, int ctl_name,
1497 goto free_procname; 1497 goto free_procname;
1498 1498
1499 p->sysctl = t; 1499 p->sysctl = t;
1500 return; 1500 return 0;
1501 1501
1502free_procname: 1502free_procname:
1503 kfree(t->dev_name); 1503 kfree(t->dev_name);
1504free: 1504free:
1505 kfree(t); 1505 kfree(t);
1506out: 1506out:
1507 return; 1507 return -ENOBUFS;
1508} 1508}
1509 1509
1510static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf) 1510static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf)