diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-04-23 19:32:33 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-04-28 13:54:28 -0400 |
commit | bfba9ab4c64f0e5c33930711e6c073c285e01fcf (patch) | |
tree | 1342b7e7d682fd468f0eb271faf2c15afdc8bd50 /net | |
parent | 335c54bdc4d3bacdbd619ec95cd0b352435bd37f (diff) | |
download | op-kernel-dev-bfba9ab4c64f0e5c33930711e6c073c285e01fcf.zip op-kernel-dev-bfba9ab4c64f0e5c33930711e6c073c285e01fcf.tar.gz |
SUNRPC: pass buffer size to svc_addsock()
Adjust the synopsis of svc_addsock() to pass in the size of the output
buffer. Add a documenting comment.
This is a cosmetic change for now. A subsequent patch will make sure
the buffer length is passed to one_sock_name(), where the length will
actually be useful.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net')
-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 8b08328..6bec1e2 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, 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); |