diff options
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 8b0832834135..6bec1e25b542 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1128,9 +1128,19 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv, | |||
1128 | return svsk; | 1128 | return svsk; |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | int svc_addsock(struct svc_serv *serv, | 1131 | /** |
1132 | int fd, | 1132 | * svc_addsock - add a listener socket to an RPC service |
1133 | char *name_return) | 1133 | * @serv: pointer to RPC service to which to add a new listener |
1134 | * @fd: file descriptor of the new listener | ||
1135 | * @name_return: pointer to buffer to fill in with name of listener | ||
1136 | * @len: size of the buffer | ||
1137 | * | ||
1138 | * Fills in socket name and returns positive length of name if successful. | ||
1139 | * Name is terminated with '\n'. On error, returns a negative errno | ||
1140 | * value. | ||
1141 | */ | ||
1142 | int svc_addsock(struct svc_serv *serv, const int fd, char *name_return, | ||
1143 | const size_t len) | ||
1134 | { | 1144 | { |
1135 | int err = 0; | 1145 | int err = 0; |
1136 | struct socket *so = sockfd_lookup(fd, &err); | 1146 | struct socket *so = sockfd_lookup(fd, &err); |