Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!styx!ptsfa!dual!unisoft!mtxinu!ed From: ed@mtxinu.UUCP (Ed Gould) Newsgroups: comp.bugs.4bsd Subject: Re: tmscp tape drives give "hard error" on reading too small a record Message-ID: <341@mtxinu.UUCP> Date: Wed, 22-Apr-87 16:44:37 EST Article-I.D.: mtxinu.341 Posted: Wed Apr 22 16:44:37 1987 Date-Received: Sat, 25-Apr-87 09:59:25 EST References: <1681@husc6.UUCP> Reply-To: ed@mtxinu.UUCP (Ed Gould) Organization: mt Xinu, Berkeley, CA Lines: 27 Keywords: tmscp, TU81, DEC >Description: > When reading a tape written with a blocksize larger than you are > using to read, any tmscp tape drive (e.g., TU81, TK50) will die > with a kernel printf "hard error: record data truncated" and an > I/O error. This should not be an error when using the raw device. That's not a bug, it's the documented - and correct - behavior of a tape driver. From mtio(4) on 4.3BSD: Each read or write call reads or writes the next record on the tape. In the write case the record has the same length as the buffer given. During a read, the record size is passed back as the number of bytes read, provided it is no greater than the ==> buffer size; if the record is long, an error is indicated. In raw tape I/O seeks are ignored. A zero byte count is returned when a tape mark is read, but another read will fetch the first record of the new tape file. This has been the correct behavior since at least the Sixth Edition. Some drivers, however, don't conform to the specification. Please don't break one that does! -- Ed Gould mt Xinu, 2560 Ninth St., Berkeley, CA 94710 USA {ucbvax,decvax}!mtxinu!ed +1 415 644 0146 "A man of quality is not threatened by a woman of equality."