Re: [PATCH] tools: gpio: replace strncpy with strscpy

From: Maxwell Doose

Date: Tue May 05 2026 - 09:16:15 EST


On Tue, May 5, 2026 at 5:57 AM Bartosz Golaszewski <brgl@xxxxxxxxxx> wrote:
>
> Are you guys two AI bots just talking nonsense to each other? This is
> a user-space tool, there's no strscpy() in libc...
>
> Reading this was a waste of two minutes I'm not getting back.
>

??
No, some confusion arised as I'm typically working in iio and gpio.
I'm more used to having strscpy() readily available and thought that
not having strscpy() in the tools-specific libraries was strange. But
the stupid thing is that it was aliased to strcpy in
tools/include/linux/string.h (#define strscpy strcpy). I'm sorry, but
we really need to at least get that macro removed, it's pretty
precarious. Besides, we're not trying to change glibc, we're just
trying to move in the latest and much safer function...