20 lines
343 B
Django/Jinja
20 lines
343 B
Django/Jinja
{# SPDX-License-Identifier: GPL-2.0 #}
|
|
|
|
{% if annotate %}
|
|
/* enum {{ name }} */
|
|
{% endif %}
|
|
{% if name in public_apis %}
|
|
bool
|
|
{% else %}
|
|
static bool __maybe_unused
|
|
{% endif %}
|
|
xdrgen_decode_{{ name }}(struct xdr_stream *xdr, {{ name }} *ptr)
|
|
{
|
|
u32 val;
|
|
|
|
if (xdr_stream_decode_u32(xdr, &val) < 0)
|
|
return false;
|
|
*ptr = val;
|
|
return true;
|
|
}
|