|
@@ -1128,9 +1128,19 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
|
|
|
return svsk;
|
|
|
}
|
|
|
|
|
|
-int svc_addsock(struct svc_serv *serv,
|
|
|
- int fd,
|
|
|
- char *name_return)
|
|
|
+/**
|
|
|
+ * svc_addsock - add a listener socket to an RPC service
|
|
|
+ * @serv: pointer to RPC service to which to add a new listener
|
|
|
+ * @fd: file descriptor of the new listener
|
|
|
+ * @name_return: pointer to buffer to fill in with name of listener
|
|
|
+ * @len: size of the buffer
|
|
|
+ *
|
|
|
+ * Fills in socket name and returns positive length of name if successful.
|
|
|
+ * Name is terminated with '\n'. On error, returns a negative errno
|
|
|
+ * value.
|
|
|
+ */
|
|
|
+int svc_addsock(struct svc_serv *serv, const int fd, char *name_return,
|
|
|
+ const size_t len)
|
|
|
{
|
|
|
int err = 0;
|
|
|
struct socket *so = sockfd_lookup(fd, &err);
|