From b191ba0d599928372be5a89f75486eb58efab48a Mon Sep 17 00:00:00 2001 From: Evgeniy Polyakov Date: Mon, 20 Mar 2006 22:21:40 -0800 Subject: [CONNECTOR]: Use netlink_has_listeners() to avoind unnecessary allocations. Return -ESRCH from cn_netlink_send() when there are not listeners, just as it could be done by netlink_broadcast(). Propagate netlink_broadcast() error back to the caller. Signed-off-by: Evgeniy Polyakov Signed-off-by: David S. Miller --- Documentation/connector/connector.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Documentation/connector/connector.txt') diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt index 57a314b14cf8..ad6e0ba7b38c 100644 --- a/Documentation/connector/connector.txt +++ b/Documentation/connector/connector.txt @@ -69,10 +69,11 @@ Unregisters new callback with connector core. struct cb_id *id - unique connector's user identifier. -void cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask); +int cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask); Sends message to the specified groups. It can be safely called from -any context, but may silently fail under strong memory pressure. +softirq context, but may silently fail under strong memory pressure. +If there are no listeners for given group -ESRCH can be returned. struct cn_msg * - message header(with attached data). u32 __group - destination group. -- cgit v1.2.3