On 5/21/26 16:08, Martin Cracauer wrote:
The branch main has been updated by cracauer:
URL:
https://cgit.FreeBSD.org/src/commit/?id=03c410ba172426aa7f2a1cc19b94250686e5c8bd
commit 03c410ba172426aa7f2a1cc19b94250686e5c8bd
Author: Martin Cracauer <[email protected]>
AuthorDate: 2026-05-21 20:08:08 +0000
Commit: Martin Cracauer <[email protected]>
CommitDate: 2026-05-21 20:08:08 +0000
man: Stop referring to non-existing manpage strlcpy(9)
Reviewed by: ziaee, mhorne, kevans
It might be best to not use a manpage reference here then. You can't call
userspace functions
from the kernel, so it is a category error for a kernel API manpage in section
9 to ever refer
to calling a userspace function from sections 2 or 3. There is an
implementation of strlcpy
int he kernel, and the point of the section 9 here was to indicate that there
is a kernel
version that can be called. However, there are many, many functions in section
3 that do not
have equivalent implementations in the kernel and cannot be called.
---
share/man/man9/copy.9 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/share/man/man9/copy.9 b/share/man/man9/copy.9
index 3a3105ddf644..fe51bbd12704 100644
--- a/share/man/man9/copy.9
+++ b/share/man/man9/copy.9
@@ -67,9 +67,10 @@ to another.
.Pp
.Fn copystr
is deprecated and should be replaced with
-.Xr strlcpy 9 .
+.Xr strlcpy 3 ,
+which has a kernel-to-kernel version.
What does this sentence even mean? We don't have a version of strlcpy anywhere
or strncpy or
strcpy that tries to copy between different address spaces (e.g. between user
and kernel
pointers). I think this is trying to address the confusion you've just
introduced, but you
would be better off IMO just saying "strlcpy" I think, e.g.:
is deprecated and should be replaced with
strlcpy.
It will be removed from
-.Fx 13 .
+.Fx 16 .
.Pp
The
.Fn copyin
--
John Baldwin