svn commit: r360943 - head/share/man/man9
Conrad Meyer
cem at FreeBSD.org
Mon May 11 22:48:01 UTC 2020
Author: cem
Date: Mon May 11 22:48:00 2020
New Revision: 360943
URL: https://svnweb.freebsd.org/changeset/base/360943
Log:
copystr(9): Move to deprecate [1/2]
Unlike the other copy*() functions, it does not serve to copy from one
address space to another or protect against potential faults. It's just
an older incarnation of the now-more-common strlcpy().
Reviewed by: jhb
MFC after: i² days
Differential Revision: yes (see 2/2)
Modified:
head/share/man/man9/copy.9
Modified: head/share/man/man9/copy.9
==============================================================================
--- head/share/man/man9/copy.9 Mon May 11 22:47:20 2020 (r360942)
+++ head/share/man/man9/copy.9 Mon May 11 22:48:00 2020 (r360943)
@@ -34,7 +34,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 15, 2017
+.Dd May 11, 2020
.Dt COPY 9
.Os
.Sh NAME
@@ -45,7 +45,7 @@
.Nm copyout_nofault ,
.Nm copystr ,
.Nm copyinstr
-.Nd kernel copy functions
+.Nd heterogenous address space copy functions
.Sh SYNOPSIS
.In sys/types.h
.In sys/systm.h
@@ -57,18 +57,21 @@
.Fn copyout "const void *kaddr" "void *uaddr" "size_t len"
.Ft int
.Fn copyout_nofault "const void *kaddr" "void *uaddr" "size_t len"
-.Ft int
+.Ft int __deprecated
.Fn copystr "const void *kfaddr" "void *kdaddr" "size_t len" "size_t *done"
.Ft int
.Fn copyinstr "const void *uaddr" "void *kaddr" "size_t len" "size_t *done"
.Sh DESCRIPTION
The
.Nm
-functions are designed to copy contiguous data from one address
+functions are designed to copy contiguous data from one address space
to another.
-All but
+.Pp
.Fn copystr
-copy data from user-space to kernel-space or vice-versa.
+is deprecated and should be replaced with
+.Xr strlcpy 9 .
+It will be removed from
+.Fx 13 .
.Pp
The
.Fn copyin
More information about the svn-src-all
mailing list