home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1679 / README next >
Encoding:
Text File  |  1990-12-28  |  2.6 KB  |  52 lines

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