DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sdi_findspec(D3sdi)


sdi_findspec -- allocate a structure from the pool of structures

Synopsis

   #include <sys/sdi.h>

struct dev_spec * sdi_findspec(struct sdi_edt *edtp, struct dev_spec *dev_spec[])

Description

sdi_findspec finds a matching device specification routine. Target drivers might need special handling of certain devices. An example is a disk which requires a power-up command on the first open. This routine looks for a match of an inquiry string of a device against those kept in the dev_spec structure defined in the Space.c file of the target driver.

Arguments


edtp
Pointer to an EDT structure for the desired device

dev_spec
Array of pointers to device specific functions relative to each of the target driver entry points

Return values

Pointer to a dev_spec entry or NULL if no match is found.

Usage

During a target driver init routine, the sdi_findspec is called to get the dev_spec structure (if defined) of the various function pointers of the device specific routines. The device specific routines which can be defined are first_open, last_close, intr, and the command helper. Only the needed functions should be defined. Included in the dev_spec structure is the inquiry string of the device which has the need for the special functions. It is also possible to define standard supported commands for the device and those which should use the command helper routine.

Context and synchronization

Non-blockable context.

Applicable hardware

x86/Pentium compatible architectures

Version applicability

sdi: 1, 2, 3, 4 target drivers.

Future directions

This routine will be removed in a future release.

References

Space.c
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005