Thanks to Markus Baur for answering my question about whether the 'mt status'
command gives information about tape file number (unfortunately it wasn't the
answer I wanted to hear!):
>
> have a look at the header files
>
> /usr/include/sys/mtio.h
> /usr/include/sys/devio.h
>
> There is all info the device driver gives us. Especially when you look at the
> `mtget' structure (see below), you will notice that DEC machines don't have a
> field `mt_fileno' like the Suns. If you need some explanations for the `mt status'
> command, in devio.h are some comments and constants that give some hints what all
> the fields mean.
>
> Best Regards,
> Markus
>
> ----------------------- /usr/include/sys/mtio.h (SUN) -----------------------
> /* structure for MTIOCGET - mag tape get status command */
> struct mtget {
> short mt_type; /* type of magtape device */
> /* the following two registers are grossly device dependent */
> short mt_dsreg; /* ``drive status'' register */
> short mt_erreg; /* ``error'' register */
> /* optional error info. */
> daddr_t mt_resid; /* residual count */
> daddr_t mt_fileno; /* file number of current position */
> daddr_t mt_blkno; /* block number of current position */
> u_short mt_flags;
> short mt_bf; /* optimum blocking factor */
> };
> ----------------------- /usr/include/sys/mtio.h (DEC) -----------------------
> /* Structure for MTIOCGET ioctl - mag tape get status command */
> struct mtget {
> short mt_type; /* Type of device defined below */
> short mt_dsreg; /* ``drive status'' register */
> short mt_erreg; /* ``error'' register */
> short mt_resid; /* Residual count */
> };
> -----------------------------------------------------------------------------
Received on Mon Apr 24 1995 - 20:53:55 NZST