C code
|
-
struct mtop op = { MTSEEK, COUNT };
result = ioctl(tapefd, MTIOCTOP, &op);
|
Description
|
Seek to the specified block.
|
Notes
|
-
ftape-4.03 emulates blocks of a constant length. That is, `
MTSEEK '
don't skip floppy tape segments but blocks of a virtual size between 1
kb and 62 kb depending on what was specified with
`MTSETBLK ' (see MTSETBLK).
-
One needs to use the non-rewinding devices when using this with the
mt program. See Rewinding devices and tape motion commands.
-
MTSEEK just modifies a variable and does not result in tape
motion.
|
Compatibility
|
-
When using ftape-3.04d and later versions up to ftape-4.02
(inclusively) seeking always stays within the same volume, and the block
address is relative to the start of the current volume. This was
incompatible with the way SCSI drives implement this command where the
block address is relative to the beginning of the tape and has been
fixed in ftape-4.03.
-
In variable block size mode the argument is interpreted as the desired
position measured in bytes. Maybe this is a bug.
-
ftape-2.x resp. sftape didn't implement this
command.
|
Example
|
seek to the 10th block, measured from the start of the current volume
-
mt -f /dev/nqft0 seek 10
|
References
|
|