From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078612210334.tru64-unix-managers.marc@archive.invalid> From: Johan Nyberg Date: Tue, 13 May 1997 13:50:24 +0000 To: tru64-unix-managers Subject: SUMMARY: Current file and block number position on magnetic tapes X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078612210334 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 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" : ---------------------------------------------------------- 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@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@ip6480nl.ce.utexas.edu (Tom Rioux) : ---------------------------------------------------------- have you looked at fgetpos and ftell? -- Johan Nyberg, The Svedberg Laboratory, Uppsala University, Uppsala, Sweden nyberg@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)