Re: [PATCH] bcachefs: replace deprecated strncpy() with strscpy()
From: Bharadwaj Raju
Date: Wed Mar 26 2025 - 11:52:37 EST
On Wed, Mar 26, 2025 at 8:22 PM Kent Overstreet
<kent.overstreet@xxxxxxxxx> wrote:
> Or better, a new helper: when we're copying to a fixed size buffer we
> really want to zero out the rest of the buffer - we don't just want a
> single terminating nul.
I believe strscpy_pad does this?
https://docs.kernel.org/core-api/kernel-api.html#c.strscpy_pad