intro(7) — SPECIAL FILES AND DEVICES
NAME
intro − introduction to special files
DEVICE NAMING CONVENTIONS
This section describes various special files that refer to specific hardware peripherals and UNIX system device drivers. STREAMS [see intro(2)] software drivers, modules, and the STREAMS-generic set of ioctl(2) system calls are also described.
The names of the entries for hardware related files are generally derived from names for the hardware, as opposed to the names of the special files themselves. Characteristics of both the hardware device and the corresponding UNIX system device driver are discussed where applicable.
Device specific special files take the form prefix_cXdYsuffix, where prefix uniquely defines the type of device, X specifies the controller number (starting from zero) of the stated device type, Y specifies the logical device number (starting from zero) for the device attached to the stated controller, and suffix specifies device-dependent information. The X and Y values are interpreted in decimal with leading zeros being forbidden. The suffix (if present) is understood to supply modification information about the device.
In addition to the device-specific special files, the system also provides generic special files. These special files simplify the access to commonly used devices by providing device-independent aliases (for example, ctape1) for the first cartridge tape drive.
Device prefixes:
| Prefix | Description |
| m187 | MVME187 CPU SCSI host adapter; M88K only |
| m197 | MVME197 CPU SCSI host adapter; M88K only |
| m328 | MVME328 SCSI host adapter; M88K only |
Hard disk, floppy, WORM, and CDROM suffixes:
| Suffix | Description |
| sZ | Z specifies the slice on the device |
Cartridge tape suffixes:
The variable mode suffixes will exist only if the device is capable of supporting variable mode.
| Suffix | Description |
| <NULL> | operate in fixed block size mode, rewind on close |
| n | operate in fixed block size mode, no rewind on close |
| f | operate in fixed block size mode, rewind on close |
| fn | operate in fixed block size mode, no rewind on close |
| v | operate in variable block size mode, rewind on close |
| vn | operate in variable block size mode, no rewind on close |
Nine-track tape suffixes:
The fixed block size mode suffixes will exist only if the device is capable of supporting fixed block mode.
Please note that the default device nodes (those without the explicit speed and density controls) specify the use of high speed and the highest density. If a tape drive does not support the high speed and highest density setting these device nodes cannot be used.
The density codes are mapped by default in the following manner: 0 corresponds to 800 bpi, 1 to 1600 bpi, 2 to 3200 bpi, and 3 to 6250 bpi.
| Suffix | Speed | Density | Rewind on close | Variable/Fixed Mode |
| <NULL> | high | 3 | yes | variable |
| n | high | 3 | no | variable |
| f | high | 3 | yes | fixed |
| fn | high | 3 | no | fixed |
| v | high | 3 | yes | variable |
| vn | high | 3 | no | variable |
| l0f | low | 0 | yes | fixed |
| l0fn | low | 0 | no | fixed |
| l0v | low | 0 | yes | variable |
| l0vn | low | 0 | no | variable |
| h0f | high | 0 | yes | fixed |
| h0fn | high | 0 | no | fixed |
| h0v | high | 0 | yes | variable |
| h0vn | high | 0 | no | variable |
| l1f | low | 1 | yes | fixed |
| l1fn | low | 1 | no | fixed |
| l1v | low | 1 | yes | variable |
| l1vn | low | 1 | no | variable |
| h1f | high | 1 | yes | fixed |
| h1fn | high | 1 | no | fixed |
| h1v | high | 1 | yes | variable |
| h1vn | high | 1 | no | variable |
| l2f | low | 2 | yes | fixed |
| l2fn | low | 2 | no | fixed |
| l2v | low | 2 | yes | variable |
| l2vn | low | 2 | no | variable |
| h2f | high | 2 | yes | fixed |
| h2fn | high | 2 | no | fixed |
| h2v | high | 2 | yes | variable |
| h2vn | high | 2 | no | variable |
| l3f | low | 3 | yes | fixed |
| l3fn | low | 3 | no | fixed |
| l3v | low | 3 | yes | variable |
| l3vn | low | 3 | no | variable |
| h3f | high | 3 | yes | fixed |
| h3fn | high | 3 | no | fixed |
| h3v | high | 3 | yes | variable |
| h3vn | high | 3 | no | variable |
Generic device names:
The N specifies the generic device number; suffix is the device dependent suffix appended to the generic device name.
| Name | Description |
| ctapeNsuffix | cartridge tapes |
| ninetrackNsuffix | 9-track tapes |
| diskN | the whole disk slice of the disk |
| cdromN | the whole disk slice of the CDROM |
| floppyNsuffix | floppy disk drives |
The disk, floppy, and CDROM device specific files are located in the /dev/{r}dsk directories; tape specific files are located in the /dev/rmt directory.
The generic disk, floppy, and CDROM device special files are located in the /dev/{r}SA directories; tape specific files are located in the /dev/rmt and /dev/rSA directories.
GENERIC FLOPPY DEVICE SUFFIXES
| Suffix | Description |
| m0 | 5.25 inch Motorola DSDD5 format (12 block offset - DISCOURAGED) |
| pcat0 | 5.25 inch IBM PC/AT 1.2MB format (15 block offset - DISCOURAGED) |
| m7 | 5.25 inch Motorola DSDD5 format (0 block offset - DISCOURAGED) |
| pcat7 | 5.25 inch IBM PC/AT 1.2MB format |
| pcxt9 | 3.5 or 5.25 inch PC/XT 9 sectors per track format |
| pcxt8 | 5.25 inch IBM PC/XT 8 sectors per track format |
| ps2 | 3.5 inch IBM PS/2 format |
| shd | 3.5 inch 2.88MB super high density format |
| pc | format determined by floppy. Used for SoftPC. |
NETWORKING INFORMATION
The following policy applies to new or enhanced network device drivers (for example m376). A network TCP/IP node major device number is
the major device number of the clone device driver. A network minor device number is the major number of the real device driver found in /etc/master.d, concatenated with the board number to which this device corresponds. Following is a pictorial representation of the minor device number as passed to the device driver.
Network TCP/IP Node Minor Device Number
The driver interprets the minor number as follows:
| MINOR DEVICE # | |||
| bit | 17 16 15 | 14 | 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |
| BOARD | RESRV | MAJOR # | |
where:
• The BOARD bits define the board device number. Boards are numbered from 0. The maximum board device number supported depends on the particular device.
• The RESRV bit must be set. This bit indicates to the clone driver that the entire minor device number must be passed to the cloned device driver.
• The MAJOR # bits correspond to the real major number of the network device as specified in the file /etc/master.d.
The device node name is also used as the Ethernet network interface name by cenet in the network database file /etc/strcf.
SCSI-1 HOST ADAPTER COMMON MINOR FORMAT
All SCSI-1 host adapters utilize the following common device minor format.
| MAJOR | MINOR | ||||||||
| bit | 31 - 18 | 17 16 15 | 14 | 13 12 11 | 10 | 9 8 7 | 6 5 | 4 3 2 1 0 | |
| SCSI | TBD | SCSI | SCSI | SCSI | TBD | DEVICE | |||
| LUN | CTRL | BUS | ADDR | INFO | |||||
As indicated in the preceding table, the controller number is located in the high-order bits of the minor format. This allows for support of more than eight controllers in the future. Each device driver should support a minimum of eight controllers where applicable. The driver info bits in the minor format are defined as follows:
| Device | Bits | Description |
| disks | 0-3 | slice number (0-f) |
| 4 | reserved | |
| all tapes | 0 | rewind/no rewind |
| 1 | fixed/variable block mode | |
| streaming tapes | 2-4 | no operation |
| (archive, exabyte,etc.) | ||
| start/stop tapes | 2 | low/high speed |
| (9-track) | 3-4 | density selection |
SCSI-2/3 HOST ADAPTER COMMON MINOR FORMAT
All SCSI-2/3 host adapters utilize the following common device minor format.
| MAJOR | MINOR | |||||||
| bit | 31 - 18 | 17 | 16 15 | 14 13 12 11 10 | 9 8 7 | 6 5 | 4 3 2 1 0 | |
| TBD | SCSI | SCSI | SCSI | TBD | DEVICE | |||
| CTRL | ADDR | LUN | INFO | |||||
As indicated in the previous table, the controller number is located in the high-order bits of the minor format. This allows for support of more controllers in the future. The driver info bits in the minor format are defined as follows:
| Device | Bits | Description |
| disks | 0-3 | slice number (0-f) |
| 4 | reserved | |
| all tapes | 0 | rewind/no rewind |
| 1 | fixed/variable block mode | |
| streaming tapes | 2-4 | no operation |
| (archive, exabyte,etc.) | ||
| start/stop tapes | 2 | low/high speed |
| (9-track) | 3-4 | density selection |