Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ulysses.UUCP Path: utzoo!watmath!clyde!burl!ulysses!ggs From: ggs@ulysses.UUCP (Griff Smith) Newsgroups: net.unix Subject: Re: write(2) to tape with odd byte count Message-ID: <1156@ulysses.UUCP> Date: Thu, 5-Dec-85 10:26:24 EST Article-I.D.: ulysses.1156 Posted: Thu Dec 5 10:26:24 1985 Date-Received: Fri, 6-Dec-85 07:26:18 EST References: <1758@uwmacc.UUCP> <320@brl-tgr.ARPA> Distribution: net Organization: AT&T Bell Laboratories, Murray Hill Lines: 30 > > Is it possible to create a tape with an odd number of bytes > > per record? When I try such an operation with write(2), I > > get a return code of -1 (Oh, sorry, this is 2.8BSD). When I > > do an identical write to a disk file, there is no problem. > > Do tape controllers only work in words? > > Actually, raw disk I/O is much worse but that's beside the point. > > Magtapes can be written with any number of bytes between about > 14 and 2K (often up to 64K-1) per record (block). However, some > brain-damaged operating systems maintain the transfer count > internally as PDP-11 words, instead of bytes. On such systems, > you can only request an even number of bytes... Oh, you're talking about the System V VAX TU78 driver maybe? It doesn't give you the error return, it quitely pads to the nearest "word" so your copy tape isn't really a duplicate of the original. The 4.2BSD TU78 driver works with any byte count <= 63k. The 4.3BSD driver will also do "read-reverse" error correction for soft tape errors, recognize end of tape (finally), report hardware failures in human readable form and survive controller power failures without crashing the system or hanging the tape drives (except on 11/750, which gets "panic: cbhung" after a while). -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: (201) 582-7736 Internet: ggs@ulysses.uucp UUCP: ulysses!ggs ( {allegra|ihnp4}!ulysses!ggs )