Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/share/man/man9 Pull up revision 1.12 (requested by thor...



details:   https://anonhg.NetBSD.org/src/rev/4aa40de588fd
branches:  netbsd-1-6
changeset: 529310:4aa40de588fd
user:      tron <tron%NetBSD.org@localhost>
date:      Sat Nov 09 10:22:17 2002 +0000

description:
Pull up revision 1.12 (requested by thorpej in ticket #527):
* Add copyin_proc() and copyout_proc(), which are like copyin() and
  copyout(), except they can operate on any process, not just curproc.
* Use this in uiomove() to allow UIO_USERSPACE to non-curproc.

diffstat:

 share/man/man9/copy.9 |  33 ++++++++++++++++++++++++---------
 1 files changed, 24 insertions(+), 9 deletions(-)

diffs (93 lines):

diff -r e6e36596dfe0 -r 4aa40de588fd share/man/man9/copy.9
--- a/share/man/man9/copy.9     Sat Nov 09 10:22:06 2002 +0000
+++ b/share/man/man9/copy.9     Sat Nov 09 10:22:17 2002 +0000
@@ -1,6 +1,6 @@
-.\"    $NetBSD: copy.9,v 1.11 2002/02/13 08:18:39 ross Exp $
+.\"    $NetBSD: copy.9,v 1.11.2.1 2002/11/09 10:22:17 tron Exp $
 .\"
-.\" Copyright (c) 1996 Jason R. Thorpe.
+.\" Copyright (c) 1996, 2002 Jason R. Thorpe.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed by Kenneth Stailey.
@@ -32,7 +32,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd February 22, 1998
+.Dd July 19, 2002
 .Dt COPY 9
 .Os
 .Sh NAME
@@ -56,6 +56,10 @@
 .Fn copyinstr "const void *uaddr" "void *kaddr" "size_t len" "size_t *done"
 .Ft int
 .Fn copyoutstr "const void *kaddr" "void *uaddr" "size_t len" "size_t *done"
+.Ft int
+.Fn copyin_proc "struct proc *p" "const void *uaddr" "void *kaddr" "size_t len"
+.Ft int
+.Fn copyout_proc "struct proc *p" "const void *kaddr" "void *uaddr" "size_t len"
 .Sh DESCRIPTION
 The
 .Nm
@@ -67,13 +71,13 @@
 The
 .Nm
 routines provide the following functionality:
-.Bl -tag -width "copyoutstr()"
+.Bl -tag -width "copyout_proc()"
 .It Fn copyin
 Copies
 .Fa len
 bytes of data from the user-space address
 .Fa uaddr
-to the kernel-space address
+in the current process to the kernel-space address
 .Fa kaddr .
 .It Fn copyout
 Copies
@@ -81,7 +85,8 @@
 bytes of data from the kernel-space address
 .Fa kaddr
 to the user-space address
-.Fa uaddr .
+.Fa uaddr
+in the current process.
 .It Fn copystr
 Copies a NUL-terminated string, at most
 .Fa len
@@ -100,7 +105,7 @@
 .Fa len
 bytes long, from user-space address
 .Fa uaddr
-to kernel-space address
+in the current process to kernel-space address
 .Fa kaddr .
 If the
 .Fa done
@@ -114,13 +119,23 @@
 bytes long, from kernel-space address
 .Fa kaddr
 to user-space address
-.Fa uaddr .
-If the
+.Fa uaddr
+in the current process.  If the
 .Fa done
 argument is non-NULL,
 the number of bytes actually copied, including the terminating
 NUL, is returned in
 .Fa *done .
+.It Fn copyin_proc
+Like
+.Fn copyin ,
+except it operates on the address space of the process
+.Fa p .
+.It Fn copyout_proc
+Like
+.Fn copyout ,
+except it operates on the address space of the process
+.Fa p .
 .El
 .Sh RETURN VALUES
 The



Home | Main Index | Thread Index | Old Index