[6943] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: seek on st.c

daemon@ATHENA.MIT.EDU (Marc SCHAEFER)
Mon Aug 2 07:37:07 1999

Date:   Mon, 2 Aug 1999 08:44:48 +0200 (MEST)
From: Marc SCHAEFER <schaefer@alphanet.ch>
To: Kai.Makisara@metla.fi
cc: linux-scsi@vger.rutgers.edu
In-Reply-To: <Pine.OSF.4.10.9908020929530.23675-100000@abies.metla.fi>



On Mon, 2 Aug 1999, Kai Makisara wrote:

> The Linux SCSI tape driver does not support lseek() (and I have not seen
> it on any other Unix either). The basic reason is that the data on a tape
> is addressed as blocks and so lseek() does not make sense.

So, why isn't fseek() failing with an error (I haven't tried seek()) ?

That wouldn't be the best comportment ?

The only case where fseek() or seek() can not return an error is
if the user wants to go forward: in that case, seek() can be implemented
as dummy reads, and not return an error. But if the driver doesn't
support that, shouldn't it simply return an error also ?

> forward and backward using the MTIOCTOP ioctl functions FSR and BSR. If
> the drive supports direct block addressing (which is your case), you can
> use the MTIOCTOP function MTSEEK to to position the tape and the MTIOCPOS
> ioctl to get the current position.

Thank you very much (that's probably what mt fsf|bsf|bsr|fsr is using).



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post