On Thu, 22 Apr 1999, Ilya Dorfman wrote:
> Hi,
> I have a SCSI tape.
> Is there a way to find out that I'm about to reach the end of the tape?
> When write() returns the value that is less than the buffer size that
> means that EOT is reached and nothing more could be written.
> Is there any 'early notification' about EOT?
>
The SCSI devices would allow early notification but the problem is the
Unix tape semantics: there is no common way to tell that we are at
the early-warning point. The Unix driver returns zero to indicate the end
of tape and nothing else is available for portable programs. Solaris
allows writes past this point in the following way: the first write after
EOT indication writes whatever can be written, the next returns zero, the
next writes, etc. This "feature" is not supported by other Unices and I
would not recommend utilizing in programs.
Kai
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]