SUNWcsu
tapes creates symbolic links from the /dev/rmt directory to the actual tape device special files under the /devices directory tree. tapes searches the kernel device tree to see what tape devices are attached to the system. For each equipped tape drive, the following steps are performed:
.
- The /dev/rmt directory is searched for a /dev/rmt/n entry that is a symbolic link to the /device special node of the current tape drive. If one is found, this determines the logical controller number of the tape drive.
.- The rest of the special devices associated with the drive are then checked, and incorrect symbolic links are removed and necessary ones added.
.- If none are found, a new logical controller number is assigned (the lowest-unused number), and new symbolic links are created for all the special devices associated with the drive.
tapes does not remove unneeded tape drive links; these must be removed by hand.
tapes is called each time the system is reconfiguration-booted. tapes can only be run after drvconfig(1M) is run, since drvconfig builds the kernel data structures and the /devices tree.
Of interest to device driver writers are the devices that tapes considers tape devices. Device nodes of type DDI_NT_TAPE are considered tape devices (see ddi_create_minor_node(9F) for more information on node types.)
If tapes finds entries of a particular logical controller linked to different physical controllers, it prints an error message and exits without making any changes to the /dev directory, since it cannot determine which of the two alternative logical to physical mappings is correct. The links should be manually corrected or removed before another reconfiguration boot is performed.