SUNRPC: Make address format buffers more generic
For now we will assume that all transports will use the address format buffers in the rpc_xprt struct to store their addresses. Change rpc_peer2str() to be a generic routine to handle this, and get rid of the print_address() op in the rpc_xprt_ops vector. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:

committed by
Trond Myklebust

parent
314dfd7987
commit
7559c7a28f
@@ -594,7 +594,11 @@ EXPORT_SYMBOL_GPL(rpc_peeraddr);
|
||||
char *rpc_peeraddr2str(struct rpc_clnt *clnt, enum rpc_display_format_t format)
|
||||
{
|
||||
struct rpc_xprt *xprt = clnt->cl_xprt;
|
||||
return xprt->ops->print_addr(xprt, format);
|
||||
|
||||
if (xprt->address_strings[format] != NULL)
|
||||
return xprt->address_strings[format];
|
||||
else
|
||||
return "unprintable";
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpc_peeraddr2str);
|
||||
|
||||
|
Reference in New Issue
Block a user