Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!cbosgd!gatech!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.unix Subject: Re: write(2) to tape with odd byte count Message-ID: <320@brl-tgr.ARPA> Date: Thu, 5-Dec-85 02:39:48 EST Article-I.D.: brl-tgr.320 Posted: Thu Dec 5 02:39:48 1985 Date-Received: Fri, 6-Dec-85 06:44:37 EST References: <1758@uwmacc.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 19 > 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. I don't know why you would get an error return instead of having your request rounded to an even number of bytes. I am also surprised if 2.8BSD really still has the old 6th Edition word counts instead of the 7th Edition byte counts. Look in the sources and see if there is a b_wcount (or some such name) which would indicate word count is being used.