Manual page for strategy(9E)
strategy - perform block I/O
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int prefixstrategy(struct buf *bp);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
This entry point is
required
for block devices.
ARGUMENTS
- bp
-
Pointer to the
buf.9s
structure.
DESCRIPTION
The
strategy()
routine is called indirectly (through
cb_ops.9s
by the kernel to read and
write blocks of data on the block device.
strategy()
may also be
called directly or indirectly
to support the raw character interface
of a block device (read.9e
write.9e
and
ioctl.9e
The
strategy()
routine's responsibility is
to set up and initiate the transfer.
RETURN VALUES
The
strategy()
routine should always return 0. On an error condition, it should
OR
the
b_flags
member of the
buf.9s
structure with
B_ERROR,
set the
b_error
member to the
appropriate error value, and call
biodone.9f
Note that a partial transfer is
not
considered to be an error.
SEE ALSO
ioctl.9e
read.9e
write.9e
biodone.9f
buf.9s
cb_ops.9s
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97