From 9c0338b1b4495457659157e1e9f47d422dcefc2e Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Wed, 14 May 2025 16:37:27 -0600 Subject: lib9p: Remove uses of printf --- lib9p/core_gen/c_marshal.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib9p/core_gen/c_marshal.py') 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" -- cgit v1.2.3-2-g168b