PREV UP NEXT The Ftape Installation and Usage Guide


8.8.1.1: MTRESET

C code
struct mtop op = { MTRESET, 0 };
result = ioctl(tapefd, MTIOCTOP, &op);

Description

Resets the tape drive (the hardware) and resets the kernel driver (the software) to a definite initial state as if the cartridge has been newly inserted. Loads the tape is that is supported by the tape drive.


Notes

Be careful: resetting the driver simulates insertion of a new cartridge, so the driver forgets about unflushed write buffers and the values of all internal variables (i.e. resets them to initial values). Please read the section about rewinding and non-rewinding tape devices. See Rewinding devices.

For ftape-3.04d (and later versions) a MTRESET command also puts the drive online, i.e. reverses the MTOFFL command. This was not the case with ftape-2.x. See MTOFFL.

If you have used the MTLOCK command with an Iomega Ditto Max tape drive, then the door lock is cleared by MTRESET.

The difference between a MTRESET command and a MTLOAD command is that the MTLOAD command doesn't reset the hardware, and is a no-op when issued while a cartridge is loaded and the drive hasn't been put offline with MTOFFL.


Example
mt -f /dev/qft0 reset

References
Rewinding devices
MTREW
MTOFFL
MTLOAD
MTUNLOAD

ftape logo Use these buttons to jump to the top menu

TOP (previous node) TOP (parent node) TOP (next node) TOP (this node)