Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!endor!dudek From: dudek@endor.harvard.edu (Glen Dudek) Newsgroups: comp.bugs.4bsd Subject: Re: tmscp tape drives give "hard error" on reading too small a record Message-ID: <1696@husc6.UUCP> Date: Mon, 20-Apr-87 07:19:02 EST Article-I.D.: husc6.1696 Posted: Mon Apr 20 07:19:02 1987 Date-Received: Tue, 21-Apr-87 00:33:35 EST References: <1681@husc6.UUCP> <2412@ulysses.homer.nj.att.com> Sender: news@husc6.UUCP Reply-To: dudek@harvard.harvard.edu (Glen Dudek) Organization: Aiken Computation Lab Harvard, Cambridge, MA Lines: 26 Keywords: tmscp, TU81, DEC I realize the dangers of silently truncating data, but UNIX semantics for raw tape devices require this behaviour (at least, all such raw tape drivers I've ever seen behave this way). Until the interface is changed to allow more out-of-band information to be passed along with the data (e.g., data truncated, physical end-of-tape, etc.), vendors need to stick with existing semantics. I found this problem when a remote software installation broke because the installation assumed 'dd if=/dev/rmt4 of=/dev/null' would successfully skip a tape file independent of blocksize. Since the default blocksize for dd is 512, and the tape blocksize was larger, the device reported a hard error. How can we change the interface to such devices to allow reporting these kinds of errors? Do we need to change the system call interface to do this? I suppose ioctl can be used for the application above, but that would require two system calls for every device write. How about another int (or preferably, a more complex structure which hides the data better and allows some extensibility) analagous to errno, but which is valid after all system calls and can be used to pass such information? The data can be kept in the user structure and copied to some well-known address in the processes' virtual address space (blech, kludge, any better ideas?). Is anyone working on increasing the information passed through the system call interface? Glen Dudek Computer Facilities Manager Aiken Computation Lab