summaryrefslogtreecommitdiff
path: root/lib9p/core_gen/c_marshal.py
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-14 16:37:27 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-15 14:56:35 -0600
commit9c0338b1b4495457659157e1e9f47d422dcefc2e (patch)
tree9102ac3a979f082e1c39f9d4223df5f98a7be0c2 /lib9p/core_gen/c_marshal.py
parent67cec6d2770aa14a13c89247612f16c628ebd54c (diff)
lib9p: Remove uses of printf
Diffstat (limited to 'lib9p/core_gen/c_marshal.py')
-rw-r--r--lib9p/core_gen/c_marshal.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib9p/core_gen/c_marshal.py b/lib9p/core_gen/c_marshal.py
index 322e1ef..bddf55f 100644
--- a/lib9p/core_gen/c_marshal.py
+++ b/lib9p/core_gen/c_marshal.py
@@ -381,10 +381,9 @@ def gen_c_marshal(versions: set[str], typs: list[idl.UserType]) -> str:
else:
ret += "\tif (needed_size > ctx->max_msg_size) {\n"
if isinstance(typ, idl.Message): # SPECIAL (disable for stat)
- ret += f'\t\tlib9p_errorf(ctx, {c9util.IDENT("ERRNO_L_ERANGE")}, "%s message too large to marshal into %s limit (%"PRIu{szbits}" > %"PRIu32")",\n'
- ret += f'\t\t\t"{typ.typname}",\n'
- ret += f'\t\t\tctx->version ? "negotiated" : "{'client' if typ.msgid % 2 == 0 else 'server'}",\n'
- ret += "\t\t\tneeded_size, ctx->max_msg_size);\n"
+ ret += f'\t\tlib9p_error(ctx, {c9util.IDENT("ERRNO_L_ERANGE")}, "{typ.typname} message too large to marshal into ",\n'
+ ret += f'\t\t\tctx->version ? "negotiated" : "{'client' if typ.msgid % 2 == 0 else 'server'}", " limit",\n'
+ ret += '\t\t\t" (", needed_size, " > ", ctx->max_msg_size, ")");\n'
ret += "\t\treturn true;\n"
ret += "\t}\n"