'\" 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] .TH BP_COPYOUT 9F "Oct 16, 2007" .SH NAME bp_copyout \- copy from a driver buffer into a buf(9S) .SH SYNOPSIS .LP .nf #include #include \fBint\fR \fBbp_copyout\fR(\fBvoid *\fR\fIdriverbuf\fR, \fBstruct buf *\fR\fIbp\fR, \fBoffset_t\fR \fIoffset\fR, \fBsize_t\fR \fIsize\fR); .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI). .SH PARAMETERS .sp .ne 2 .na \fB\fIbp\fR\fR .ad .RS 13n Pointer to the buffer header structure to copy to. .RE .sp .ne 2 .na \fB\fIdriverbuf\fR\fR .ad .RS 13n Driver buffer to copy from. .RE .sp .ne 2 .na \fB\fIoffset\fR\fR .ad .RS 13n Offset into \fIbp\fR where to start copying. .RE .sp .ne 2 .na \fB\fIsize\fR\fR .ad .RS 13n Size of copy. .RE .SH DESCRIPTION .sp .LP The \fBbp_copyout()\fR function copies \fIsize\fR bytes starting from the driver buffer \fIdriverbuf\fR to \fIoffset\fR bytes into the memory associated with \fIbp\fR. The \fIoffset\fR only applies to \fIbp\fR. .SH RETURN VALUES .sp .LP Under normal conditions, 0 is returned to indicate a successful copy. Otherwise, -1 is returned if \fIbp\fR references invalid pages. .SH CONTEXT .sp .LP The \fBbp_copyout()\fR function can be called from user or kernel context only. .SH SEE ALSO .sp .LP .BR bp_copyin (9F), .BR bp_mapin (9F), .BR bp_mapout (9F), .BR ddi_copyout (9F), .BR buf (9S)