Re: [PATCH v2 05/15] serial: core: replace snprintf with more robust scnprintf

From: Hugo Villeneuve

Date: Mon May 04 2026 - 11:27:30 EST


On Thu, 30 Apr 2026 17:07:11 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Tue, Apr 28, 2026 at 01:53:51PM -0400, Hugo Villeneuve wrote:
> >
> > Use scnprintf() so we could perhaps one day get rid of snprintf() entirely.
>
> Ah, now I understand the approach in earlycon. Hmm... Still not sure which one
> I prefer (it's not related to the contents of this patch anyway).
>
> ...
>
> > default:
> > strscpy(address, "*unknown*", sizeof(address));
>
> Side note: This may use 2-argument strscpy().

This section is now removed in patch:
serial: core: use uart_iotype_*() to simplify uart_report_port()

But interesting to know this 2-argument variant :)


--
Hugo Villeneuve