File Index
Files and directories
Sign in
FILE

argument.j2

File preview with syntax highlighting.

linux-6.19.14/tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2 PLAIN TEXT
 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{% 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}
~/ Read-only file preview.