xref: /titanic_51/usr/src/man/man2/uucopy.2 (revision b74cec98319cdf0854be09126da89ba80d5baa2e)
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]
uucopy 2 "12 Sep 2006" "SunOS 5.11" "System Calls"
NAME
uucopy - no-fault memory-to-memory copy
SYNOPSIS

#include <strings.h>

int uucopy(const void *s1, void *s2, size_t n);
DESCRIPTION

The uucopy() function copies n bytes from memory area s1 to s2. Copying between objects that overlap could corrupt one or both buffers.

Unlike bcopy(3C), uucopy() does not cause a segmentation fault if either the source or destination buffer includes an illegal address. Instead, it returns -1 and sets errno to EFAULT. This error could occur after the operation has partially completed, so the contents of the buffer at s2 are defined if the operation fails.

RETURN VALUES

Upon successful completion, uucopy() returns 0. Otherwise, the function returns -1 and set errno to indicate the error.

ERRORS

The uucopy() function will fail if:

EFAULT

Either the s1 or s2 arguments points to an illegal address.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityEvolving
MT-LevelMT-Safe
SEE ALSO

bcopy(3C), attributes(5)