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

do_ioctl(D3)


do_ioctl -- invoke another driver's ioctl(D2) entry point routine

Synopsis

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

int do_ioctl(chan_handle_t chan_handle, int cmd, void *arg, int mode, cred_t *crp, int *rvalp);

Description

do_ioctl( ) calls another driver's ioctl(D2) entry point routine. This driver must first obtain a channel handle with the drv_open(D3) function. The "other driver" may actually be the same driver.

Arguments


chan_handle
Channel handle returned by the drv_open(D3) function in the other driver.

cmd
cmd argument to be passed to the other driver's ioctl(D2) routine

arg
arg argument to be passed to the other driver's ioctl(D2) routine

mode
mode argument to be passed to the other driver's ioctl(D2) routine

crp
crp argument to be passed to the other driver's ioctl(D2) routine

rvalp
rvalp argument to be passed to the other driver's ioctl(D2) routine

Return values

Returns 0 on success, or the appropriate errno value on failure. The corresponding ioctl system call will usually return 0 on success or -1 on failure, although this value can be changed by the setting of the rvalp argument.

Usage

Context and synchronization

User context.

Hardware applicability

All

Version applicability

ddi: 8, 8mp

References

drv_attach(D3), drv_detach(D3), drv_open(D3), ioctl(D2)

``Layered device drivers'' in HDK Technical Reference


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