summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2010-10-20 00:17:54 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-10-24 18:02:53 -0400
commit35b61e63323ccf5fdcdd74b11751b58392c9cce1 (patch)
tree9e52ba11f99df17ce4c58edb2842cc8cc9ea9950 /include/linux
parent3c9101a0575f6078191dae6bb91a834c6aac3557 (diff)
downloadblackbird-op-linux-35b61e63323ccf5fdcdd74b11751b58392c9cce1.tar.gz
blackbird-op-linux-35b61e63323ccf5fdcdd74b11751b58392c9cce1.zip
SUNRPC: define xdr_decode_opaque_fixed
A helper for decoding a fixed length opaque value. Returns a pointer to the next item in the xdr stream. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sunrpc/xdr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index ab91d86565fd..498ab93a81e4 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -132,6 +132,13 @@ xdr_decode_hyper(__be32 *p, __u64 *valp)
return p + 2;
}
+static inline __be32 *
+xdr_decode_opaque_fixed(__be32 *p, void *ptr, unsigned int len)
+{
+ memcpy(ptr, p, len);
+ return p + XDR_QUADLEN(len);
+}
+
/*
* Adjust kvec to reflect end of xdr'ed data (RPC client XDR)
*/
OpenPOWER on IntegriCloud