SUMMARY: Current file and block number position on magnetic tapes

From: Johan Nyberg <nyberg_at_unix.tsl.uu.se>
Date: Tue, 13 May 1997 15:50:24 +0200

Hi,

I am very sorry for the delayed summary. The answer to my question is NO.
See, however, the suggestion from Tom Rioux below, which I still have
not tried. Thanks to all the prompt answers!

My original question was:
---------------------------------------------------------

One of my colleagues is porting a C program from Solaris to DU4.0.
The program accesses magnetic tape drives (we use mainly EXABYTE 8505
drives). On Solaris he can from within his program get the current
file and block number position on the tape, because in <sys/mtio.h> the
structure mtget includes the following two members:

        daddr_t mt_fileno; /* file number of current position */
        daddr_t mt_blkno; /* block number of current position */


On DU4.0 the mtget structure does not have these members. Does anybody
out there know if and how it is possible to find the current file and block
number position from within a C program on DU4.0?


Here are the three answers I got:

"Dr. Tom Blinn, 603-881-0646" <tpb_at_zk3.dec.com> :
----------------------------------------------------------
I believe the answer for V4.0 is "no". I think there *may* be a project to
make this information available (and reliable) for use in a future release
of Digital UNIX, but I'd have to dig into project plans to be sure. Is it
vitally important for you to have this information, or is it just a "would
be nice to have"? (After all, a program that is reading a tape can keep the
information for itself; it's just book-keeping.)


alan_at_nabeth.cxo.dec.com :
----------------------------------------------------------
You can't because our tape drivers don't currently keep
track of that information. I know that various people
have asked for the feature, so it may be added in a future
major release.


rioux_at_ip6480nl.ce.utexas.edu (Tom Rioux) :
----------------------------------------------------------
have you looked at fgetpos and ftell?


-- 
Johan Nyberg, The Svedberg Laboratory, Uppsala University, Uppsala, Sweden
nyberg_at_unix.tsl.uu.se,  http://www3.tsl.uu.se/~nyberg.  Fax: +46-18-183833 
Tel: +46-18-183047 (office), +46-18-324314 (home), +46-708-324314 (mobile) 
Received on Tue May 13 1997 - 16:16:07 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT