Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mtio(7) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mt(1)

tar(1)

tcb(1)

tp(1)

tc(7)




mtio(7) mtio(7)
NAME mtio - interface conventions for magnetic tape devices DESCRIPTION The mtio library allows applications to access tape devices using a standard interface. While the general read, write, and seek operations are part of the standard I/O library, additional library resources are required to add support for tape devices. The mtio li- brary helps provide a fairly device-independent way to per- form additional operations, such as rewind, that are common to tape drives, but not common to other types of devices. There are several system-dependent parameters that this gen- eric device interface uses. The most important is a stan- dard I/O block size, BLKDEV_IOSIZE, which is defined in <sys/param.h>. For A/UX, this value is 1024. The commands that typically are used in conjunction with a tape drive, such as tar(1), ultimately generate requests to read and write 1024-byte blocks when the tape devices are specified for either input or output. However, a peculiarity of the Apple SC 40 Tape Backup is that it can only read and write in blocks of 8192 bytes, requiring a specially formulated user command line (see tc(7) and tcb(1)). The mtio library moderates device I/O when output is sent to or obtained from the device files in /dev/rmt. IOCTLS When manipulating the tape cartridge device more directly through your own programs, or through programs such as mt(1), tape-specific operations are supported through mtio ioctls. With a few exceptions, these generic operations are shared by all tape drives. One exception is the ``format'' ioctl (MTFORMAT), which is available for the Apple SC 40 Tape Backup only; in general, this is not a function of reel tape drives, such as 9-track tape drives. Other exceptions that apply to the tape cartridge unit are described in tc(7). The following is a list of mtio ioctls, and their associated subcommands. For complete details about the data structures, see <sys/mtio.h>. ioctl(fd, MTIOCGET, *mtget) This tape ioctl causes the tape unit to return the status of the tape drive, returning values in mtget. ioctl(fd, MTIOCTOP, *mtop) This tape ioctl causes the tape unit to peform the sub- command selected by the current values stored in the structure mtop. April, 1990 1



mtio(7) mtio(7)
The subcommands for MTIOCTOP include: MTWEOF write an end-of-file record MTFSF forward space file MTBSF backward space file MTFSR forward space record MTBSR backward space record MTREW rewind MTOFFL rewind and put the drive offline MTNOP no operation, sets status only FILES /usr/lib/sys/ioctl.h /usr/lib/sys/mtio.h /dev/rmt/* SEE ALSO mt(1), tar(1), tcb(1), tp(1), tc(7). 2 April, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026