diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2006-12-05 16:35:37 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-06 10:46:51 -0500 |
commit | 7559c7a28fbcaa0bca028eeebd5f251b09befe6b (patch) | |
tree | 5cbf7df3f966243261e1923641618fd813126734 /net/sunrpc/clnt.c | |
parent | 314dfd7987c71d7ba0c43ac3bf3d243c102ce025 (diff) | |
download | blackbird-op-linux-7559c7a28fbcaa0bca028eeebd5f251b09befe6b.tar.gz blackbird-op-linux-7559c7a28fbcaa0bca028eeebd5f251b09befe6b.zip |
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>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 7d65e19550cc..aba528b9ae76 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -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); |