Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,10 @@
{# SPDX-License-Identifier: GPL-2.0 #}
{% if annotate %}
/* member {{ name }} (basic) */
{% endif %}
{% if type in pass_by_reference %}
if (!xdrgen_encode_{{ type }}(xdr, &ptr->u.{{ name }}))
{% else %}
if (!xdrgen_encode_{{ type }}(xdr, ptr->u.{{ name }}))
{% endif %}
return false;
@@ -0,0 +1,7 @@
{# SPDX-License-Identifier: GPL-2.0 #}
{% if annotate %}
/* discriminant {{ name }} */
{% endif %}
if (!xdrgen_encode_{{ type }}(xdr, ptr->{{ name }}))
return false;
if (ptr->{{ name }}) {
@@ -0,0 +1,2 @@
{# SPDX-License-Identifier: GPL-2.0 #}
break;
@@ -0,0 +1,2 @@
{# SPDX-License-Identifier: GPL-2.0 #}
case {{ case }}:
@@ -0,0 +1,2 @@
{# SPDX-License-Identifier: GPL-2.0 #}
case __constant_cpu_to_be32({{ case }}):
@@ -0,0 +1,4 @@
{# SPDX-License-Identifier: GPL-2.0 #}
}
return true;
}
@@ -0,0 +1,2 @@
{# SPDX-License-Identifier: GPL-2.0 #}
default:
@@ -0,0 +1,12 @@
{# SPDX-License-Identifier: GPL-2.0 #}
{% if annotate %}
/* union {{ name }} */
{% endif %}
{% if name in public_apis %}
bool
{% else %}
static bool __maybe_unused
{% endif %}
xdrgen_encode_{{ name }}(struct xdr_stream *xdr, const struct {{ name }} *ptr)
{
@@ -0,0 +1,6 @@
{# SPDX-License-Identifier: GPL-2.0 #}
{% if annotate %}
/* member {{ name }} (variable-length string) */
{% endif %}
if (!xdrgen_encode_string(xdr, ptr->u.{{ name }}, {{ maxsize }}))
return false;
@@ -0,0 +1,7 @@
{# SPDX-License-Identifier: GPL-2.0 #}
{% if annotate %}
/* discriminant {{ name }} */
{% endif %}
if (!xdrgen_encode_{{ type }}(xdr, ptr->{{ name }}))
return false;
switch (ptr->{{ name }}) {
@@ -0,0 +1,3 @@
{# SPDX-License-Identifier: GPL-2.0 #}
if (!xdrgen_encode_void(xdr))
return false;