projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3f2512
)
genetlink: add function genl_has_listeners()
author
Nicolas Dichtel
<
[email protected]
>
Thu, 18 Sep 2014 08:31:03 +0000
(10:31 +0200)
committer
David S. Miller
<
[email protected]
>
Fri, 19 Sep 2014 21:28:26 +0000
(17:28 -0400)
This function is the counterpart of the function netlink_has_listeners().
Signed-off-by: Nicolas Dichtel <
[email protected]
>
Acked-by: Pravin B Shelar <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
include/net/genetlink.h
patch
|
blob
|
history
diff --git
a/include/net/genetlink.h
b/include/net/genetlink.h
index 93695f0e22a54a7e4fa16f6934b1e085e75e1a7b..af10c2cf8a1dce00d9cc5414f67d5917bf911570 100644
(file)
--- a/
include/net/genetlink.h
+++ b/
include/net/genetlink.h
@@
-394,4
+394,12
@@
static inline int genl_set_err(struct genl_family *family, struct net *net,
return netlink_set_err(net->genl_sock, portid, group, code);
}
+static inline int genl_has_listeners(struct genl_family *family,
+ struct sock *sk, unsigned int group)
+{
+ if (WARN_ON_ONCE(group >= family->n_mcgrps))
+ return -EINVAL;
+ group = family->mcgrp_offset + group;
+ return netlink_has_listeners(sk, group);
+}
#endif /* __NET_GENERIC_NETLINK_H */