Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ strategy(9E) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(9E)

read(9E)

write(9E)

buf(9S)

strategy(9E)

NAME

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);

ARGUMENTS

bp Pointer to the buf(9S) structure. 

INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).  This entry point is Required for block devices. 

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() should return 0 on success.  On an error condition, it should OR the b_flags member of the buf(9S) structure with B_ERROR and set the b_error member to the appropriate error value.  Note that a partial transfer is not considered to be an error. 

SEE ALSO

ioctl(9E), read(9E), write(9E), buf(9S)

Sun Microsystems  —  Last change: 11 Apr 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026