Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017
 
 

bp_copyout(9F)

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)