summaryrefslogtreecommitdiff
path: root/tools/net/sunrpc/xdrgen/templates/C/union/decoder/string.j2
diff options
context:
space:
mode:
Diffstat (limited to 'tools/net/sunrpc/xdrgen/templates/C/union/decoder/string.j2')
-rw-r--r--tools/net/sunrpc/xdrgen/templates/C/union/decoder/string.j26
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/net/sunrpc/xdrgen/templates/C/union/decoder/string.j2 b/tools/net/sunrpc/xdrgen/templates/C/union/decoder/string.j2
new file mode 100644
index 000000000000..83b6e5a14e7f
--- /dev/null
+++ b/tools/net/sunrpc/xdrgen/templates/C/union/decoder/string.j2
@@ -0,0 +1,6 @@
+{# SPDX-License-Identifier: GPL-2.0 #}
+{% if annotate %}
+ /* member {{ name }} (variable-length string) */
+{% endif %}
+ if (!xdrgen_decode_string(xdr, (struct string *)ptr->u.{{ name }}, {{ maxsize }}))
+ return false;