diff options
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 6bec1e25b542..032b52ea9541 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -259,8 +259,23 @@ static int one_sock_name(char *buf, struct svc_sock *svsk) | |||
259 | return len; | 259 | return len; |
260 | } | 260 | } |
261 | 261 | ||
262 | int | 262 | /** |
263 | svc_sock_names(char *buf, struct svc_serv *serv, char *toclose) | 263 | * svc_sock_names - construct a list of listener names in a string |
264 | * @serv: pointer to RPC service | ||
265 | * @buf: pointer to a buffer to fill in with socket names | ||
266 | * @buflen: size of the buffer to be filled | ||
267 | * @toclose: pointer to '\0'-terminated C string containing the name | ||
268 | * of a listener to be closed | ||
269 | * | ||
270 | * Fills in @buf with a '\n'-separated list of names of listener | ||
271 | * sockets. If @toclose is not NULL, the socket named by @toclose | ||
272 | * is closed, and is not included in the output list. | ||
273 | * | ||
274 | * Returns positive length of the socket name string, or a negative | ||
275 | * errno value on error. | ||
276 | */ | ||
277 | int svc_sock_names(struct svc_serv *serv, char *buf, const size_t buflen, | ||
278 | const char *toclose) | ||
264 | { | 279 | { |
265 | struct svc_sock *svsk, *closesk = NULL; | 280 | struct svc_sock *svsk, *closesk = NULL; |
266 | int len = 0; | 281 | int len = 0; |