xref: /linux/tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2 (revision d141ec2825b4d3ec52f27c43bdd864090159273a)
1{# SPDX-License-Identifier: GPL-2.0 #}
2
3/**
4 * {{ program }}_svc_decode_{{ argument }} - Decode a {{ argument }} argument
5 * @rqstp: RPC transaction context
6 * @xdr: source XDR data stream
7 *
8 * Return values:
9 *   %true: procedure arguments decoded successfully
10 *   %false: decode failed
11 */
12bool {{ program }}_svc_decode_{{ argument }}(struct svc_rqst *rqstp, struct xdr_stream *xdr)
13{
14{% if argument in structs %}
15	struct {{ argument }} *argp = rqstp->rq_argp;
16{% else %}
17	{{ argument }} *argp = rqstp->rq_argp;
18{% endif %}
19
20	return xdrgen_decode_{{ argument }}(xdr, argp);
21}
22