Next | Prev | Up | Top | Contents | Index
Creating Device-special Files for User-level SCSI Drivers
If the logical unit for the SCSI device you want to control from a user-level program is some value other than 0, you need to create a device-special file. See the mknod(1) and ds(7) man pages for more information. To create a device-special file, use the mknod command:
% mknod filename type major# minor#
where:
- filename
- The name of the device special file to create for the device.
- type
- The type of special file:
c = character special file
b = block special file
- major#
- The major device number. For a device that will be controlled from a user-level program, this number is 195, which is the major device number of devscsi.
- minor#
- The 14-bit (decimal) minor device. The bits are defined as shown in Figure 5-1.
Figure 5-1 : Minor Number Bit Definitions
Example
% mknod /dev/scsi/sc0d1l1 c 195 17
The minor device number is set to 1710, which is 00100012, thus indicating a device that has logical unit number 1 and a target ID of 1.
Next | Prev | Up | Top | Contents | Index