xref: /linux/tools/net/sunrpc/xdrgen/templates/C/program/encoder/argument.j2 (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1{# SPDX-License-Identifier: GPL-2.0 #}
2
3{%if annotate %}
4/* Encode {{ argument }} arguments */
5{% endif %}
6static void {{ program }}_xdr_enc_{{ argument }}(struct rpc_rqst *req,
7		struct xdr_stream *xdr, const void *data)
8{
9{% if argument == 'void' %}
10	xdrgen_encode_void(xdr);
11{% else %}
12	const struct {{ argument }} *args = data;
13
14	xdrgen_encode_{{ argument }}(xdr, args);
15{% endif %}
16}
17