2 .\" Copyright (c) 2007, 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 BP_COPYOUT 9F "Oct 16, 2007"
8 bp_copyout \- copy from a driver buffer into a buf(9S)
12 #include <sys/types.h>
18 \fBint\fR \fBbp_copyout\fR(\fBvoid *\fR\fIdriverbuf\fR, \fBstruct buf *\fR\fIbp\fR, \fBoffset_t\fR \fIoffset\fR,
19 \fBsize_t\fR \fIsize\fR);
25 Architecture independent level 1 (DDI/DKI).
33 Pointer to the buffer header structure to copy to.
42 Driver buffer to copy from.
51 Offset into \fIbp\fR where to start copying.
66 The \fBbp_copyout()\fR function copies \fIsize\fR bytes starting from the
67 driver buffer \fIdriverbuf\fR to \fIoffset\fR bytes into the memory associated
68 with \fIbp\fR. The \fIoffset\fR only applies to \fIbp\fR.
72 Under normal conditions, 0 is returned to indicate a successful copy.
73 Otherwise, -1 is returned if \fIbp\fR references invalid pages.
77 The \fBbp_copyout()\fR function can be called from user or kernel context only.
81 \fBbp_copyin\fR(9F), \fBbp_mapin\fR(9F), \fBbp_mapout\fR(9F),
82 \fBddi_copyout\fR(9F), \fBbuf\fR(9S)