home *** CD-ROM | disk | FTP | other *** search
- wt.c
- ====
-
- This is a util that I made because ISC 2.0.2 didn't provide a
- means to retension, or erase cartridge tapes that used the Wangtek
- driver provided as part of the ISC package. Once that worked, I added
- in a piecemeal fashion the functions that accomplished a rewind (by
- opening and closing the device), and a means to skip over data on an
- partially filled cartridge, so one could put another archive on it.
- The fwd skip function also works for positioning to read the second
- archive.
-
- Since the driver only provides 2 ioctl() operations (retension and
- erase), the rewind and fsf functions are cobbled together by use of
- open(), close() and read() operations - in other words, faked.
- The fsf (forward skip file) takes an optional count, but because
- of the limitations of the driver, it doesn't handle a count greater
- than the number of files to skip gracefully, and ends up positioning
- the tape in a useless position. A rewind is needed to get things
- squared away again. Still, its handy if one doesn't tell it to
- go past the last record.
-
- The util defaults to use the devices that are normally created when
- the Wangtek driver is configured, with provision to try the several
- alternate names in case one or more is removed, etc. One can also
- specify the device to access using the one and only option, -f.
-
- This thing is anything but elegant, but it is one approach to the
- question of how does one do these operations on a cartridge tape under
- ISC version 2.0.2. More info as to how its used is in the source.
- No makefile is needed - with wt.c in the current working directory
- simply type ``make wt'', or if you prefer, use this command:
- ``cc -O -s wt.c -o wt -lc_s''. This will make a smaller executable
- because it uses the shared library.
-
- DISCLAIMER: No guarantees are made regarding suitability or
- correctness of wt.c, especially when used to position the tape to put
- more than one archive on a tape. If one doesn't know what they are
- doing, using the fsf option could set you up to lose data - as in the
- case where a second archive is present, and one replaces the first one
- on the tape. Second files or archives on a tape are not a great idea
- unless one KNOWS that they will not be altering the preceeding
- archive. If one has to change the preceeding archives, read ALL the
- data off the cartridge, or put the changed archive on another
- cartridge, and then, if necessary, copy the following archives off the
- previous ctg and add them to the new one. One cannot change the size
- of archives on a tape without clobbering following archives as one can
- do on a floppy disk. Use common sense here.
-
- Enjoy, but at your own risk. pat@rwing
-
-