xref: /linux/tools/net/sunrpc/xdrgen/templates/C/program/encoder/argument.j2 (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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