xref: /linux/tools/net/sunrpc/xdrgen/templates/C/enum/encoder/enum.j2 (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1*4b132aacSChuck Lever{# SPDX-License-Identifier: GPL-2.0 #}
2*4b132aacSChuck Lever
3*4b132aacSChuck Lever{% if annotate %}
4*4b132aacSChuck Lever/* enum {{ name }} */
5*4b132aacSChuck Lever{% endif %}
6*4b132aacSChuck Lever{% if name in public_apis %}
7*4b132aacSChuck Leverbool
8*4b132aacSChuck Lever{% else %}
9*4b132aacSChuck Leverstatic bool __maybe_unused
10*4b132aacSChuck Lever{% endif %}
11*4b132aacSChuck Leverxdrgen_encode_{{ name }}(struct xdr_stream *xdr, enum {{ name }} value)
12*4b132aacSChuck Lever{
13*4b132aacSChuck Lever	return xdr_stream_encode_u32(xdr, value) == XDR_UNIT;
14*4b132aacSChuck Lever}
15