'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH UUCOPY 2 "Sep 12, 2006"
.SH NAME
uucopy \- no-fault memory-to-memory copy
.SH SYNOPSIS
.LP
.nf
#include <strings.h>

\fBint\fR \fBuucopy\fR(\fBconst void *\fR\fIs1\fR, \fBvoid *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBuucopy()\fR function copies \fIn\fR bytes from memory area \fIs1\fR to
\fIs2\fR.  Copying  between objects that overlap could corrupt one or both
buffers.
.sp
.LP
Unlike \fBbcopy\fR(3C), \fBuucopy()\fR does not cause a segmentation fault if
either the source or destination buffer includes an illegal address. Instead,
it returns \(mi1 and sets \fBerrno\fR to \fBEFAULT\fR. This error could occur
after the operation has partially completed, so the contents of the buffer at
\fIs2\fR are defined if the operation fails.
.SH RETURN VALUES
.sp
.LP
Upon successful completion, \fBuucopy()\fR returns 0.  Otherwise, the function
returns \(mi1 and  set \fBerrno\fR to indicate the error.
.SH ERRORS
.sp
.LP
The \fBuucopy()\fR function will fail if:
.sp
.ne 2
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
Either the \fIs1\fR or \fIs2\fR arguments points to an illegal address.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.sp
.LP
\fBbcopy\fR(3C), \fBattributes\fR(5)