Debian Codegraph @

tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2

raw
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 */
12 bool {{ 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 {% if argument in structs %}
18 struct {{ argument }} *argp = rqstp->rq_argp;
19 {% else %}
20 {{ argument }} *argp = rqstp->rq_argp;
21 {% endif %}
22
23 return xdrgen_decode_{{ argument }}(xdr, argp);
24 {% endif %}
25 }