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