|
|
Establish conditional modules for each I/O control command.
Syntax:
#include "sys/scsi.h"int xxioctl(dev, cmd, arg, mode) dev_t dev; int cmd, mode; caddr_t arg;
The logic is as follows:
u.u_error
to ENODEV and return.
Then check that the device is present.
If not, set u.u_error
to ENODEV and return.
u.u_error
to EINVAL and return.