Aucbvax.1393 fa.unix-wizards utzoo!duke!decvax!ucbvax!Szurko@UDel Fri May 22 14:49:49 1981 mag tape control we've had the following set around here for about 3-4 years and they seem to be all that's needed. we have drives that have to be manually switched for 800/1600 so you might want to add a control to do it programatically for drives that have the capability. Code Argument Meaning MTWEOF none write an eof mark at the current tape pos. MTSKIP <# OF TAPE RECS> skip the indicated number of tape records. a positive value means forward, negative means backwards. MTREWIND none rewind tape MTUNLOAD none unload tape There's also a way to turn off rewind and/or eof writing on close besides the different minor device number hack. It's also very important to have a defined set of error codes. we use the following set (this is not complete): Code Meaning EMTEOF encountered an eof mark during read, write or skip EMTEOT encountered end of tape during read, write or skip EMTBOT encountered beginning of tape (on reverse skips) EMTBAD 'bad tape' error i'm think there are others, but i'm not sure off-hand. you can see that using this set of control primitives and error codes, it's a simple matter to write user level routines which skip files and position the tape between the final two eof marks on a reel, etc. unix has terrible mag tape handling (so what else is new, right?) given the above functionality in raw interface, there is really no need for the block interface as far as i can see. consequently, we don't use it (except in 'tp'). this isn't really a very complete presentation, but it gives a good idea of what we have. i would argue for a minimum set of control primitives keeping most of the fancy stuff in user code. ed ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.