From 46c24939e2e0f41f0719289cd3b491367cf3355e Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Wed, 2 Apr 2025 17:28:53 -0600 Subject: lib9p: Add lo_box_lib9p_msg_as_fmt_formatter() to tables --- lib9p/9p.generated.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib9p/9p.generated.c') diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c index d1a632b..b58a485 100644 --- a/lib9p/9p.generated.c +++ b/lib9p/9p.generated.c @@ -4870,9 +4870,9 @@ static void lib9p_dm_format(lib9p_dm_t *self, struct fmt_state *state) { fmt_state_puts(state, "OTHER_X"); empty = false; } - if (!empty) - fmt_state_putchar(state, '|'); - fmt_state_printf(state, "%#04"PRIo32, *self & 0777); + if (!empty) + fmt_state_putchar(state, '|'); + fmt_state_printf(state, "%#04"PRIo32, *self & 0777); fmt_state_putchar(state, ')'); } @@ -7358,7 +7358,10 @@ const struct _lib9p_ver_tentry _lib9p_table_ver[LIB9P_VER_NUM] = { #endif /* CONFIG_9P_ENABLE_9P2000_u */ }; -#define _MSG(typ) [LIB9P_TYP_##typ] = {.name=#typ} +#define _MSG(typ) [LIB9P_TYP_##typ] = { \ + .name = #typ, \ + .box_as_fmt_formatter = (_box_as_fmt_formatter_fn_t)lo_box_lib9p_msg_##typ##_as_fmt_formatter, \ + } const struct _lib9p_msg_tentry _lib9p_table_msg[LIB9P_VER_NUM][0x100] = { [LIB9P_VER_unknown] = { _MSG(Tversion), -- cgit v1.2.3-2-g168b