Re: [PATCH iproute2-next 1/2] devlink: Pull the value printing logic out of pr_out_param_value()

From: Stephen Hemminger
Date: Tue Nov 18 2025 - 11:04:31 EST


On Mon, 17 Nov 2025 16:40:02 -0800
Daniel Zahka <daniel.zahka@xxxxxxxxx> wrote:

> - print_uint(PRINT_ANY, "value", " value %u",
> + snprintf(format_str, sizeof(format_str), " %s %%u", label);
> + print_uint(PRINT_ANY, label, format_str,

The problem with generating format strings is that it makes it difficult to
impossible to use any of the compiler format validation flags.