]> err.no Git - linux-2.6/commitdiff
[GENETLINK]: Add cmd dump completion.
authorJamal Hadi Salim <hadi@cyberus.ca>
Sat, 2 Dec 2006 04:07:42 +0000 (20:07 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:32:09 +0000 (21:32 -0800)
Remove assumption that generic netlink commands cannot have dump
completion callbacks.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/genetlink.h
net/netlink/genetlink.c

index 7fd131c9a8ccee66ab22ca8f6838784fc72a13fd..adff4c898d50ea40d5a4b09afedbf708c0c508f8 100644 (file)
@@ -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;
 };
 
index cc874f0fcbdbc26abf59d245b9c7f87f65023759..b9b03747c1f39e5882c702e0cdde95c6a61dcfbd 100644 (file)
@@ -331,7 +331,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));