xref: /titanic_51/usr/src/man/man9f/bp_copyout.9f (revision d583b39bfb4e2571d3e41097c5c357ffe353ad45)
te
Copyright (c) 2007, 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]
BP_COPYOUT 9F "Oct 16, 2007"
NAME
bp_copyout - copy from a driver buffer into a buf(9S)
SYNOPSIS

#include <sys/types.h>
#include <sys/buf.h>




int bp_copyout(void *driverbuf, struct buf *bp, offset_t offset,
 size_t size);
INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

PARAMETERS
bp

Pointer to the buffer header structure to copy to.

driverbuf

Driver buffer to copy from.

offset

Offset into bp where to start copying.

size

Size of copy.

DESCRIPTION

The bp_copyout() function copies size bytes starting from the driver buffer driverbuf to offset bytes into the memory associated with bp. The offset only applies to bp.

RETURN VALUES

Under normal conditions, 0 is returned to indicate a successful copy. Otherwise, -1 is returned if bp references invalid pages.

CONTEXT

The bp_copyout() function can be called from user or kernel context only.

SEE ALSO

bp_copyin(9F), bp_mapin(9F), bp_mapout(9F), ddi_copyout(9F), buf(9S)