SCSI(3) Library Functions Manual SCSI(3)
scsi - SCSI command interface
bind #S /dev
The scsi interface is accessed through a two-level directory. The
scsiid file contains the SCSI id of the host interface, typically 7,
represented textually. Some implementations allow this to be changed
by writing to the file; in many cases, the higher-order bits are hard-
Each SCSI target n (0n7) is associated with a subdirectory #S/n con-
taining files cmd, data, and debug. The following steps may be used to
execute a SCSI command:
The command block is written to the cmd file.
The data file is either written or read depending on the direc-
tion of the transfer. (A command that involves no data transfer
is executed with a zero-length write.)
The cmd file is read to retrieve the status of the command,
returned as a 4-byte big-endian integer.
Writing an ASCII to the debug file causes tracing information to be
written to /dev/klog; writing a turns the tracing off.