import less(1)
[unleashed/tickless.git] / share / man / man2 / uucopy.2
blob0fd0bd8cc26f5d9e6fd0789cd259d99fd0c7b113
1 '\" te
2 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH UUCOPY 2 "Sep 12, 2006"
7 .SH NAME
8 uucopy \- no-fault memory-to-memory copy
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <strings.h>
14 \fBint\fR \fBuucopy\fR(\fBconst void *\fR\fIs1\fR, \fBvoid *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBuucopy()\fR function copies \fIn\fR bytes from memory area \fIs1\fR to
21 \fIs2\fR.  Copying  between objects that overlap could corrupt one or both
22 buffers.
23 .sp
24 .LP
25 Unlike \fBbcopy\fR(3C), \fBuucopy()\fR does not cause a segmentation fault if
26 either the source or destination buffer includes an illegal address. Instead,
27 it returns \(mi1 and sets \fBerrno\fR to \fBEFAULT\fR. This error could occur
28 after the operation has partially completed, so the contents of the buffer at
29 \fIs2\fR are defined if the operation fails.
30 .SH RETURN VALUES
31 .sp
32 .LP
33 Upon successful completion, \fBuucopy()\fR returns 0.  Otherwise, the function
34 returns \(mi1 and  set \fBerrno\fR to indicate the error.
35 .SH ERRORS
36 .sp
37 .LP
38 The \fBuucopy()\fR function will fail if:
39 .sp
40 .ne 2
41 .na
42 \fB\fBEFAULT\fR\fR
43 .ad
44 .RS 10n
45 Either the \fIs1\fR or \fIs2\fR arguments points to an illegal address.
46 .RE
48 .SH ATTRIBUTES
49 .sp
50 .LP
51 See \fBattributes\fR(5) for descriptions of the following attributes:
52 .sp
54 .sp
55 .TS
56 box;
57 c | c
58 l | l .
59 ATTRIBUTE TYPE  ATTRIBUTE VALUE
61 Interface Stability     Evolving
63 MT-Level        MT-Safe
64 .TE
66 .SH SEE ALSO
67 .sp
68 .LP
69 \fBbcopy\fR(3C), \fBattributes\fR(5)