home *** CD-ROM | disk | FTP | other *** search
- $Id: ASPI.DOC,v 1.1 1992/01/15 01:43:16 chris Exp $
-
- A short explanation to the aspi - hack. chris@alderan.sdata.de
- -------------------------------------------------------------------------
-
- INSTALLATION:
- -------------
-
- If you want to use the makefile you have to use a unix-compatible make
- (like nmake, etc.). There is also a special makefile for Microsoft's
- make: "makefile.msc".
-
- Look at the makefile. There is a variable DEFAULT_TAPE_ID
- you might wish to change. This defines the scsi-host-adapter-number,
- the scsi-target-id and the logical-unit-number of the scsitape.
- E.g.:
- DEFAULT_TAPE_ID="0:2:0"
- | | |
- adapter-num (0 if you just have 1 controller) -----------| | |
- | |
- scsi-target-id (0-7) --------------------------------------| |
- |
- logical-unit-number -----------------------------------------|
-
- On most systems, you just have one host adapter, so the adapter-num
- will almost always be "0". The same is true for the logical unit number.
- All streamers support only logical unit number "0". Only the scsi-target
- ID depends on your scsi-setup. So, you will define DEFAULT_TAPE_ID to
- something like "0:2:0" or "0:4:0". If you don't define the variable
- then default "0:4:0" is compiled in as the default.
- You may also define the environment variable TAPEID (same syntax as
- DEFAULT_TAPE_ID). TAPEID overwrites at runtime your default setting.
- E.g. you may put a "TAPEID=0:3:0" in your autoexec.bat.
-
- Now, say "make dosall" if you using a unix compatible make
- or "make makefile.msc" if you using microsoft's make to build
- tar.exe and ctctrl.exe
-
- Adaptec's ASPI4DOS
- ------------------
- In order to run "tar" and "ctctrl" you will need to install adaptec's
- "ASPI4DOS.SYS". ASPI4DOS is a property program ov Adaptec and so
- it's sure not included in this distribution.
-
-
- RUNNING THE PROGRAMS:
- ----------------------
-
- ctctrl:
- -------
-
- ctctrl is a small tape control tool: say "ctctrl -?" to get the online-help
- to see what it does.
-
- tar:
- ----
- Say tar +help to get the online help.
- There are two special archive file names.
- The filename "/dev/ct" specifies the cartridge-tape and "/dev/nrct"
- specifies the no-rewind-cartridge-tape (no rewind on close). I choose
- those names, because they unlikely to exist on an MSDOS filesystem
- and because I'm used to them from my ix386.
-
- E.g.:
- tar -c c:/some/dir - creates the tar-file "tar.out"
- tar -cf archive.tar c:/some/dir - creates the tar-file "archive.tar"
- tar -cf /dev/ct c:/some/dir - cretaes a tar-file on the scsi-tape
- and rewinds the tape on close.
- tar -cf /dev/nrct c:/some/dir - creates a tar-file on the scsi-tape
- and does *not* rewind the tape on close
-
- Too append one tar-file to the end of another just use the "/dev/nrct" device.
- E.g: 1) tar -cf /dev/nrct c:/some/dir
- 2) tar -cf /dev/ct d:/some/other/dir
-
- Multi volume archives are now supported by the aspi-functions(). So, you
- may backup your whole disk in one GO to a multi volume tape archive.
- E.g.: tar -cvMf /dev/ct c:/ d:/ e:/ f:/ writes your c:, d:, e: and
- f: - drive to the tape archive.
-
- You might have noticed the use of "/" instead of "\" to separate dirnames
- in a pathname. So, don't use the backslash in pathnames, use the normal
- slash.
-
- SOURCES
- -------
- First, the aspi-functions() come from a project I made for a customer.
- They usually build up a DLL (Dynamic Link Library) for WIN 3.
- So, I took a part of the source, removed all the Windows 3 specific
- stuff (memory allocation etc.) and made them compile without WIN3.
-
- The import of the aspi-functions to gnu-tar-1.10 was fairly easy.
- In the headerfile "rmt.h" I changed all the defines for the
- io-functions. E.g.:
-
- #define rmtcreat aspicreat
- #define rmtopen aspiopen
- #define rmtread aspiread
- #define rmtwrite aspiwrite
- #define rmtclose aspiclose .... etc.
- ... and that's really the only patch to the GNU-tar sources, I had to do,
- to import the aspi-functions(). :-)
-
- aspicreat(), aspiopen(), aspiread() now just look if the archive-name
- is "/dev/ct" or "/dev/nrct" and if so, they calling the aspi-interface
- to perform the IO otherwise they just pass the request to creat(), open(),
- read(), write() .. etc.
-
- Oh yeah, before I forget: I had to make some changes in diffarch.c to make
- the -d option work. The code there mixes up "long" and "int" and does
- things like: "int_var = read(fileds, char_buf_pointer, long_count)" ?!@#*!!
- I made some type castings there, it's still not very nice, but it works.
-
- So, that's all there is to it. If you have problems getting it to run,
- feel free to email me a note: Email to chris@alderan.sdata.de
-
- Chris