PREV UP NEXT The Ftape Installation and Usage Guide - Ioctls


8.8.3: MTIOCPOS, query the tape position

Note that ftape-2.x and sftape didn't implement this ioctl. ftape-3.04d and later versions up to ftape-4.02 return the block number relative to the current tape volume, i.e. the distance to the next file mark towards BOT.

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.

This command is sent to the drive by the mt command with

mt -f /dev/nqft0 tell

The following is from the standard Linux include file

[/usr/src/linux/]/include/linux/mtio.h.

/* structure for MTIOCPOS - mag tape get position command */

struct  mtpos {
        long    mt_blkno;       /* current block number */
};
#define MTIOCPOS        _IOR('m', 3, struct mtpos)      /* get tape position */

ftape logo Use these buttons to jump to the top menu

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