summaryrefslogtreecommitdiff
path: root/lib9p/idl.gen
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/idl.gen')
-rwxr-xr-xlib9p/idl.gen18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib9p/idl.gen b/lib9p/idl.gen
index 8e7639a..c0a2444 100755
--- a/lib9p/idl.gen
+++ b/lib9p/idl.gen
@@ -1045,7 +1045,7 @@ static ALWAYS_INLINE bool marshal_8(struct _marshal_ctx *ctx, uint64_t *val) {
for tok in member.val.tokens:
if isinstance(tok, ExprSym) and tok.name.startswith("&"):
if tok.name[1:] not in mark_offset:
- ret += f"\n\tuint32_t _{tok.name[1:]}_offset;"
+ ret += f"\tuint32_t _{tok.name[1:]}_offset;\n"
mark_offset.add(tok.name[1:])
# Pass 2 - main pass
@@ -1092,9 +1092,9 @@ static ALWAYS_INLINE bool marshal_8(struct _marshal_ctx *ctx, uint64_t *val) {
ret += "\t ;\n"
ret += "}\n"
- # vtables ##################################################################
+ # vtables / exports ########################################################
ret += f"""
-/* vtables ********************************************************************/
+/* vtables / exports **********************************************************/
#define _MSG(typ) [{idprefix.upper()}TYP_##typ] = {{ \\
.basesize = sizeof(struct {idprefix}msg_##typ), \\
@@ -1123,6 +1123,18 @@ struct _vtable_version _{idprefix}vtables[{c_ver_enum('NUM')}] = {{
ret += ifdef_pop(0)
ret += "};\n"
+ ret += f"""
+FLATTEN bool _{idprefix}validate_stat(struct _validate_ctx *ctx) {{
+ return validate_stat(ctx);
+}}
+FLATTEN void _{idprefix}unmarshal_stat(struct _unmarshal_ctx *ctx, struct lib9p_stat *out) {{
+ unmarshal_stat(ctx, out);
+}}
+FLATTEN bool _{idprefix}marshal_stat(struct _marshal_ctx *ctx, struct lib9p_stat *val) {{
+ return marshal_stat(ctx, val);
+}}
+"""
+
############################################################################
return ret