Tape EOF processing

Bob Russes russes at ryn.DEC.COM
Sun May 14 11:50:49 AEST 1989


In article <490 at sequoia.UUCP> keith at sequoia.UUCP (Keith Pyle) writes:

>behavior (other than "It's a bug")?  If not a bug, is there a method,
>other than the one I've discovered, to clear the condition to permit
>the next read(2) to succeed as the manual says it should in the first
>place?

	To get around the problem, I simply advance the tape zero files.
Note:  this only seems to work on the VAX, it doesn't seem to work on a
DS3100:

 if (fromtape)
    {
      if ((len = read(fileno(fp), tapebuf, BUFLEN)) > 0)
	{ markcount = 0; return len; }
      if (++markcount == 1)
	then {
	       op.mt_op    = MTFSF;
               op.mt_count =     0;
               ioctl (fileno(fp),MTIOCTOP,&op);
               return TAPE_MARK;
	     }

    }

-----

Bob



More information about the Comp.unix.ultrix mailing list