Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35b61e63 authored by Benny Halevy's avatar Benny Halevy Committed by Trond Myklebust
Browse files

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: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarFred Isaman <iisaman@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 3c9101a0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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)
 */