DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

drvctl(D2)


drvctl -- handle custom I/O operations from another driver

Synopsis

   #include <sys/types.h>
   #include <sys/ddi.h>
   

int prefixdrvctl(void *idata, channel_t channel, int cmd, void *arg);

Description

The drvctl( ) entry point routine handles custom I/O operations from another driver.

Arguments


idata
For hardware drivers, a pointer to the device-specific instance data as output by the CFG_ADD subfunction of the config(D2) entry point routine. For software-only drivers, idata is undefined and should not be referenced. See ``Device instance'' in HDK Technical Reference.

channel
Channel number used to select subcomponents and/or operating modes of this device instance. See ``Channel number'' in HDK Technical Reference.

cmd
Command argument the driver drvctl( ) routine inteprets as the operation to be performed.

arg
Passes parameters between the calling driver and this driver. The interpretation of arg is dependent on the command and the driver. For example, the argument can be an integer or it can be the address of a structure that contains driver or hardware settings.

Return values

The drvctl( ) routine should return 0 for success, or the appropriate error number from those listed on the errnos(D5) manual page.

Usage

This entry point is optional.

The drvctl( ) entry point is similar to ioctl(D2), but is invoked from other kernel-level drivers rather than from user processes.

Context and synchronization

Blockable context. The driver can block but cannot do operations such as copyout(D3) that require access to the requesting process's address space.

Hardware applicability

All

Version applicability

ddi: 8, 8mp

References

do_drvctl(D3)


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