'\"macro stdmacro
.if n .pH ddi_dki.strategy @(#)strategy	40.5 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} strategy D2DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} strategy D2DK "" "DDI/DKI"
.if \nX=2 .ds x} strategy D2DK "" "\&"
.if \nX=3 .ds x} strategy "" "" "\&"
.TH \*(x}
.IX "\f4strategy\fP(D2DK)"
.SH NAME
\f4strategy\f1 \- perform block I/O
.SH SYNOPSIS
.nf
.na
\f4
#include <sys/types.h>
#include <sys/buf.h>
.sp 0.5
int \f2prefix\f4strategy(\f4struct buf *\f1\f2bp\f4);\f1
.ad
.fi
.SH ARGUMENT
.RS 0n
.IP "\f2bp\f1" 10n
Pointer to the \f4buf\f1(D4DK) structure.
.RE
.SH DESCRIPTION
The \f4strategy\f1 routine is called indirectly (through
\f4bdevsw\f1) by the kernel to read and
write blocks of data on the block device.  \f4strategy\f1 may also be
called directly or indirectly (via a call to the kernel function
\f4physiock\f1(D3D)), to support the raw character interface
of a block device (\f4read\f1(D2DK), \f4write\f1(D2DK) and
\f4ioctl\f1(D2DK)).  The \f4strategy\f1 routine's responsibility is
to set up and initiate the transfer.
.SH RETURN VALUE
On an error condition,
.SM OR
the \f4b_flags\f1 
member of the \f4buf\f1(D4DK)
structure with \f4B_ERROR\f1 and set the \f4b_error\f1 member to the
appropriate error value.
.SH SEE ALSO
.na
\f4read\f1(D2DK),
\f4write\f1(D2DK)
.ad
