]> err.no Git - linux-2.6/blobdiff - net/netlink/af_netlink.c
[PATCH] ipc: convert /proc/sysvipc/* to generic seq_file interface
[linux-2.6] / net / netlink / af_netlink.c
index 47e791738014ad5d97177740ab51cc5eabf49b50..62435ffc61846396e6a862dd9907319a1a3b8688 100644 (file)
@@ -861,7 +861,7 @@ out:
 }
 
 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid,
-                     u32 group, int allocation)
+                     u32 group, unsigned int __nocast allocation)
 {
        struct netlink_broadcast_data info;
        struct hlist_node *node;
@@ -1204,7 +1204,9 @@ static void netlink_data_ready(struct sock *sk, int len)
  */
 
 struct sock *
-netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len), struct module *module)
+netlink_kernel_create(int unit, unsigned int groups,
+                      void (*input)(struct sock *sk, int len),
+                      struct module *module)
 {
        struct socket *sock;
        struct sock *sk;
@@ -1234,7 +1236,7 @@ netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len), struct
        nlk->flags |= NETLINK_KERNEL_SOCKET;
 
        netlink_table_grab();
-       nl_table[unit].groups = 32;
+       nl_table[unit].groups = groups < 32 ? 32 : groups;
        nl_table[unit].module = module;
        nl_table[unit].registered = 1;
        netlink_table_ungrab();