int ioctl (struct scsi_device * sdp, int cmd, void * arg);
Returns negative ``errno'' value when there is a problem. 0 or a positive value indicates success and is returned to the user space.
The SCSI subsystem uses a ``trickle down'' ioctl model. The user issues an ioctl against an upper level driver (e.g. /dev/sdc) and if the upper level driver doesn't recognize the 'cmd' then it is passed to the SCSI mid level. If the SCSI mid level does not recognize it, then the LLD that controls the device receives the ioctl. According to recent Unix standards unsupported ioctl 'cmd' numbers should return -ENOTTY. However the mid level returns -EINVAL for unrecognized 'cmd' numbers when this function is not supplied by the driver. Unfortunately some applications expect -EINVAL and react badly when -ENOTTY is returned; stick with -EINVAL.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
If you have comments on the formatting of this manpage, then please contact Michael Still (mikal@stillhq.com).
This documentation was generated with kernel version 2.5.70.