home *** CD-ROM | disk | FTP | other *** search
- The logic in TAPE: is awfully convoluted, but it should do basically this:
- On open, regardless of type, it goes into a 'just opened' state and waits.
- The first ACTION_READ or ACTION_WRITE throws it into the appropriate state,
- and from there on it only accepts further packets of that type until closed.
- It tries to keep track of the tape state, so that opening for write will cause
- an automatic append unless the tape is rewound, in which case it will over-
- write the tape, and that opening for read will start at the next file mark.
- The special file name "tape:r" forces a rewind always, and the special file
- name "tape:a" forces an append in write mode. So by always using the file
- name "tape:r" you get the same behaviour as with the default (rewinding)
- Unix device driver. Here is an example of storing two tar files on a tape,
- and reading them off again:
-
- tar cvf tape:r dir1
- tar cvf tape: dir2
- tar xvf tape:r
- tar xvf tape:
-
- Here is an example of storing two files, reading the first, then storing a
- third at the end:
-
- tar cvf tape:r dir1
- tar cvf tape: dir2
- tar xvf tape:r
- tar cvf tape:a dir3
-
- Needless to say, "tape:r" can be "TAPE:REWIND" or what have you as long as
- an "r" or "R" follows the colon. Likewise for "TAPE:APPEND".
-
- Note that in the above examples, interrupting a tape read with ^C would
- not have mattered, since the next open for read would skip automatically
- until it finds a file mark.
-
- The only thing a "tape file system" could do that TAPE: can't is store
- named files on a sequential-access tape, i.e. do basically what the cassette
- system on a Commodore PET did. Since skipping to file marks imposes as much
- wear as actually reading data and I can now read in streaming mode (I presume
- you have always been able to do that) there is no penalty for just using "tar"
- as the file system -- except that a tar archive must be created all at once.
-
- If I found the need, I'd probably add a "TAPE:SKIP<n>" special file name, so
- that "tape:s5" would mean "skip 5 files then read". But I haven't needed it
- yet.
-
- -------------------------------------------------------------------------
-
- Notes:
-
- The TAPE: mountlist entry will cause the Commodore mount command to choke.
- You must (with this version) use the ARP mount command, unless you want to
- modify the tape-handler to contain the necessary info, perhaps in a 'patch'
- area that can be modified with an external program.
-
- -------------------------------------------------------------------------
-