diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-02-24 09:30:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-26 14:10:06 -0500 |
commit | 80d326fab534a5380e8f6e509a0b9076655a9670 (patch) | |
tree | 57c636de934b3f8abb7db9bcde64360ecc4eaf66 /net/xfrm/xfrm_user.c | |
parent | 48e316bc2e045206248c6c75c0d5bbc0c9ddc32c (diff) |
netlink: add netlink_dump_control structure for netlink_dump_start()
Davem considers that the argument list of this interface is getting
out of control. This patch tries to address this issue following
his proposal:
struct netlink_dump_control c = { .dump = dump, .done = done, ... };
netlink_dump_start(..., &c);
Suggested by David S. Miller.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r-- | net/xfrm/xfrm_user.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 66b84fbf2746..7128dde0fe1a 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -2299,8 +2299,13 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
2299 | if (link->dump == NULL) | 2299 | if (link->dump == NULL) |
2300 | return -EINVAL; | 2300 | return -EINVAL; |
2301 | 2301 | ||
2302 | return netlink_dump_start(net->xfrm.nlsk, skb, nlh, | 2302 | { |
2303 | link->dump, link->done, 0); | 2303 | struct netlink_dump_control c = { |
2304 | .dump = link->dump, | ||
2305 | .done = link->done, | ||
2306 | }; | ||
2307 | return netlink_dump_start(net->xfrm.nlsk, skb, nlh, &c); | ||
2308 | } | ||
2304 | } | 2309 | } |
2305 | 2310 | ||
2306 | err = nlmsg_parse(nlh, xfrm_msg_min[type], attrs, XFRMA_MAX, | 2311 | err = nlmsg_parse(nlh, xfrm_msg_min[type], attrs, XFRMA_MAX, |