Path: utzoo!attcan!uunet!lll-winken!ames!sun-barr!rutgers!tut.cis.ohio-state.edu!ucbvax!ulysses!ggs From: ggs@ulysses.homer.nj.att.com (Griff Smith) Newsgroups: comp.unix.wizards Subject: Re: read(2) won't move TK50 past tape file mark Summary: time for my annual tape device driver flame Keywords: ultrix tk50 unix tapes Message-ID: <11594@ulysses.homer.nj.att.com> Date: 25 May 89 14:38:34 GMT References: <187@larry.sal.wisc.edu> <10530@ihlpb.ATT.COM> Organization: AT&T Bell Laboratories, Murray Hill Lines: 38 In article <10530@ihlpb.ATT.COM>, res@ihlpb.ATT.COM (Rich Strebendt) writes: [deleted description of standard System V tape device driver behavior] > On all of the tape controllers with which I have worked, if EOF has been > encountered the controller does not attempt to read the tape. It just sends > back another "you already found EOF, dummy" indication. Perhaps you haven't used DEC products? > This is to protect > against a program ignoring EOF and attempting to read a couple thousand feet of > possibly blank tape -- one heck of an Inter-Block Gap!! So what? A well designed controller will time out after about 20 feet. This is another round in the battle between the `let's protect people from their stupidity' school and the `give me simple tools that do what I say' school. If you have ever tried to debug a damaged tape, the gratuitous file positioning enforced by the System V drivers can be maddening. I have some software that implements IBM tape input access methods. The software is convenient to use on BSD systems where EOF isn't sticky; people can use the auto-rewind tape names reliably, even though each dataset is actually three files. For the System V version of the software I have to document the feature that the auto-rewind files must not be used; the @#$%@# operating system rewinds the tape after I `close' to get to the next file. If it is really necessary to have user friendly tape behavior, there should be some sort of `half-baked' tape device that implements it. The raw device should do nothing but basic I/O and control operations, and it should have no strange side-effects. I would even be happy to see auto-rewind disappear for the raw device. -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: 1-201-582-7736 UUCP: {most AT&T sites}!ulysses!ggs Internet: ggs@ulysses.att.com