xref: /linux/tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2 (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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 == 'void' %}
15	return xdrgen_decode_void(xdr);
16{% else %}
17	struct {{ argument }} *argp = rqstp->rq_argp;
18
19	return xdrgen_decode_{{ argument }}(xdr, argp);
20{% endif %}
21}
22