Next: Writing and checking your
Up: Tape Devices in MIDAS
Previous: Using a template file
Most of the tapes in Unix are controlled basically in the same way:
-
The interface between the program and the tape driver program is the
same as for normal files, when using system calls like open(),
close(), read() and write().
-
For special tape commands like rewind, skip back a file
etc... a different interface is used. The system call is standard Unix
and is called ioctl(). It accepts as parameter the tape command
to be executed and can return a status of the tape. The differences
between one machine and another are the names and number of commands
supported by the device (usually defined in an system include file
called mtio.h), and the status codes (usually undefined).
Petra Nass
11/25/1998