Skip to contentSkip to conversation

add cmd dump completion

PATCH Applied jamal 3 participants 3 messages Dec 1, 2006 – Dec 2, 2006

Subsystems (2)
lore
Share & tools
lore

jamal

author
#0 lore raw

PATCH 2/2 add cmd dump completion

Sorry, subject was a little messed in the previous one, but should be fine going forward ..

cheers,
jamal

[GENETLINK] add cmd dump completion

Remove assumption that generic netlink commands cannot have dump completion callbacks.

---
commit 7df98e8c6358e7e8483279904823b7bb7bcf8e50
tree 774cd008cbfb4f981e30064da301b8fc7f9476f6
parent 349e0e00396b79d8f2f9a41f6dc28dee9e7d3e3e
author Jamal Hadi Salim <[email protected]> Fri, 01 Dec 2006 06:14:20 -0500 committer Jamal Hadi Salim <[email protected]> Fri, 01 Dec 2006 06:14:20 -0500

 include/net/genetlink.h |    2 ++
 net/netlink/genetlink.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
include/net/genetlink.h +2 -0
index 7fd131c..adff4c8 100644
@@ -53,6 +53,7 @@ struct genl_info
  * @policy: attribute validation policy
  * @doit: standard command callback
  * @dumpit: callback for dumpers
+ * @done: completion callback for dumps
  * @ops_list: operations list
  */
 struct genl_ops
@@ -64,6 +65,7 @@ struct genl_ops
 				       struct genl_info *info);
 	int		       (*dumpit)(struct sk_buff *skb,
 					 struct netlink_callback *cb);
+	int		       (*done)(struct netlink_callback *cb);
 	struct list_head	ops_list;
 };
 
net/netlink/genetlink.c +1 -1
index 50928da..96b6820 100644
@@ -338,7 +338,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
 		}
 
 		*errp = err = netlink_dump_start(genl_sock, skb, nlh,
-						 ops->dumpit, NULL);
+						 ops->dumpit, ops->done);
 		if (err == 0)
 			skb_pull(skb, min(NLMSG_ALIGN(nlh->nlmsg_len),
 					  skb->len));
#1 lore raw

* jamal <[email protected]> 2006-12-01 06:33

Quoted 11 lines

Sorry, subject was a little messed in the previous one, but should be fine going forward ..

cheers,
jamal

[GENETLINK] add cmd dump completion

Remove assumption that generic netlink commands cannot have dump completion callbacks.

This looks good.