detecting EOT

Brett McCoy brtmac at maverick.ksux.ksu.edu
Wed Feb 28 09:52:28 AEST 1990


Has anyone figured out how to detect when the EOT has been reached.
The tape drives are an HP 9 track and a Archive QIC-150 Viper, connected
to a Solbourne 5/600 and SPARCstation-1 respectively.

I am trying to write a filter which will take a stream of data on stdin
and write it to a tape.  When the EOT is reached, it will rewind the tape,
unload it and wait for a new tape to be loaded, at which time it will
continue to write.  The program providing the data can assume that it has
an infinitely long tape to write to (i.e. dump).  Right now the HP tape
drive returns an EIO when you try to write beyond the EOT instead of
returning 0 bytes written which is what the Archive tape does.  What I need
is a way to ask the tape controller what the exact IO error is, such as
trying to write beyond EOT rather than a bad tape.  On the Archive tape
drive I just need to check for a write() operation that returns 0 bytes
written, but this does not work on the HP.

Any help would be greatly appreciated.


--
Brett McCoy                 |  The amount you can learn in a given period of
brtmac at ksuvm.bitnet         |  time is inversely proportional to the time left
brtmac at maverick.ksu.ksu.edu |  until you will be tested on said material.



More information about the Comp.unix.questions mailing list