On Wed, 27 Jan 1999, Edward Rosales Diaz wrote:
>
> Thank you very much...
> is enought for me , i am revising the mt.c now and i think that is
> well!!
>
> > You could get a copy of the source for mt to control the tape, as for read
> > or write to the tape, you simply open /dev/tape as a file and read or
> > write to it (ie, you can cat to and from /dev/tape).
Still, if you also want to read/write to the tape, be aware that you can
only read/write multiples of complete sectors (512 bytes) or, if the tape
drive supports it and the st driver is configured to do it (variable
record size), you can only read the exact record size as it was written
with the corresponding write(). (Now, I'd expect an oversized read() call
to return the actually read amount of bytes, so it's not too difficult
to code).
This, btw, is why it is no good idea to use 'cat' on a tape. Better use
'dd' as you can tell 'dd' which record size to use, but not 'cat'.
Michael.
P.S. I think this belongs to linux-tape and definitely not the groups
given here.
--
Michael Weller: [EMAIL PROTECTED], [EMAIL PROTECTED],
or even [EMAIL PROTECTED] If you encounter an eowmob account on
any machine in the net, it's very likely it's me.