'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH bp_copyout 9F "16 Oct 2007" "SunOS 5.11" "Kernel Functions for Drivers" .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 .mk .na \fB\fIbp\fR\fR .ad .RS 13n .rt Pointer to the buffer header structure to copy to. .RE .sp .ne 2 .mk .na \fB\fIdriverbuf\fR\fR .ad .RS 13n .rt Driver buffer to copy from. .RE .sp .ne 2 .mk .na \fB\fIoffset\fR\fR .ad .RS 13n .rt Offset into \fIbp\fR where to start copying. .RE .sp .ne 2 .mk .na \fB\fIsize\fR\fR .ad .RS 13n .rt 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 \fBbp_copyin\fR(9F), \fBbp_mapin\fR(9F), \fBbp_mapout\fR(9F), \fBddi_copyout\fR(9F), \fBbuf\fR(9S)