home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / A / BASE / _BASE.TAR / usr / doc / mtools / Configure next >
Encoding:
Text File  |  1994-12-29  |  6.9 KB  |  202 lines

  1. How to configure Mtools to your system...
  2.  
  3. 1) Things you'll need to know.
  4.  
  5.     The full path to the devices you want to use.
  6.  
  7.     The number of tracks, heads, and sectors supported by each device.
  8.  
  9.         5.25" 160k = 40 tracks, 1 head, and 8 sectors
  10.         5.25" 180k = 40 tracks, 1 head, and 9 sectors
  11.         5.25" 320k = 40 tracks, 2 heads, and 8 sectors
  12.         5.25" 360k = 40 tracks, 2 heads, and 9 sectors
  13.         5.25" 1.2m = 80 tracks, 2 heads, and 15 sectors
  14.         3.5"  720k = 80 tracks, 2 heads, and 9 sectors
  15.         3.5" 1.44m = 80 tracks, 2 heads, and 18 sectors
  16.  
  17.     If you choose to use a hard disk partition as one of your devices,
  18.     then you may have to change the read/write permissions on that
  19.     partition.
  20.  
  21. 2) The Makefile and msdos.h files
  22.  
  23.     The following pre-processor variables are used in Mtools.  They
  24.     should be set with "-Dvariable" in CFLAGS in the Makefile.
  25.  
  26.         BSD    for systems without System V style strings functions
  27.              or System V style utime().
  28.  
  29.         INT16    Machines with 16 bit integers such as XENIX 286.
  30.  
  31.     Pick one of the 3 following lock methods (if you have multiple
  32.     methods at your disposal, pick one in the following order).  If
  33.     a method is not chosen, record locking will not be performed.
  34.  
  35.         LOCKF    XENIX3 and SVR3.2 lock method
  36.  
  37.         FLOCK    Berkeley lock method
  38.  
  39.         FCNTL    Alternate Berkeley lock method (may not work
  40.             on devices)
  41.  
  42.     Puck *none* if you are on Linux -- record locking is still a bit
  43.     
  44.  
  45.     The folowing are pre-proccessor variables for the default device
  46.     setups for various flavors of Unix.  Pick one of the these, or
  47.     create a new entry in the devices.c file.
  48.  
  49.  
  50.         ISC    default devices for ISC's SVR3.2
  51.  
  52.         SPARC    default devices for SunOS 4.1 on a SPARCstation
  53.  
  54.         RT_ACIS    default devices for 4.3BSD on an IBM RT
  55.  
  56.         DELL    default devices for Dell's SVR4 and Merge
  57.  
  58.         XENIX    default devices for Xenix systems.
  59.  
  60.         SUN386    default devices for Sun's i386 machine
  61.  
  62.         RT_ACIS    default devices for IBM's BSD clone.        
  63.  
  64.         UNIXPC    default devices for AT&T Unix PC 7300/3B1
  65.  
  66.         SPARC_ODD for reading odd-ball disks on a Sparc
  67.  
  68.     However if you define LOADDEVS instead the configuration information
  69.     will be read from /etc/mtools (the path can be changed by editing
  70.     at devices.c). This should not be done if you would have defined
  71.     otherwise UNIXPC or SPARC_ODD, as these two choices also imply
  72.     OS dependent device initialization routines.
  73.         
  74.     There is a variable in msdos.h called SIG_TYPE which should be
  75.     configured to the "base" return type of signal();
  76.  
  77.     The fat_read.c file has a preprocessor variable "CHK_FAT" that
  78.     can be undefined to turn off the fat encoding check if needed.
  79.  
  80. 3) The devices "database" in devices.c
  81.  
  82.     WARNING:  The devices.c file, as distributed, has *NO* devices
  83.     defined.  You *MUST* select from one of the examples or edit the
  84.     devices database yourself.
  85.  
  86.     struct device {
  87.         char drive;            /* the drive letter */
  88.         char *name;            /* full path to device */
  89.         long offset;            /* skip this many bytes */
  90.         int fat_bits;            /* FAT encoding scheme */
  91.         int mode;            /* any special open() flags */
  92.         int (*gioctl) ();        /* gioctl() if needed */
  93.         int tracks;            /* tracks */
  94.         int heads;            /* heads */
  95.         int sectors;            /* sectors */
  96.     };
  97.  
  98.     drive    the drive letter (in uppercase) that you want to associate
  99.         to this device.
  100.  
  101.     name    full path to the device.  Shell expansion is done on the
  102.         name so things like $HOME/vpix/C: will work.
  103.  
  104.     offset    skip over a partition table.  Useful for msdos disk "images"
  105.         such as those VP/ix uses.
  106.  
  107.     fat_bits The encoding scheme for the File Allocation Table.  Currently
  108.         supports only 12 and 16 bit FATs.  Hard disks usually use
  109.         16 bit FATs, while all diskettes use 12 bit FATs.
  110.  
  111.     mode    any special open() mode flags (not normally used, except
  112.         in the AT&T Unixpc 7300/3b1).
  113.  
  114.     gioctl    any special ioctl() calls required after opening the device
  115.         (not normally used, except in the AT&T Unixpc 7300/3b1).
  116.  
  117.     tracks    the number of tracks supported by this device or zero if
  118.         this type of sanity checking is not required.  Do NOT use
  119.         this field for hard disks or disk "images".  Also used by
  120.         gioctl(), if present, as a default starting place.
  121.  
  122.     heads    the number of heads supported by this device or zero if
  123.         this type of sanity checking is not required.
  124.  
  125.     sectors    the number of sectors supported by this device or zero if
  126.         this type of sanity checking is not required.
  127.  
  128.  
  129.     If a device supports more than one disk capacity (1.2m and
  130.     360k), then you should place the most frequently used capacity
  131.     first.  You may get an error message from the device driver when
  132.     the disk capacity doesn't match the device, but these can be
  133.     safely ignored.
  134.  
  135. 4)  Some example devices
  136.  
  137.     If you define LOADDEVS, then a sample /etc/mtools file may be:
  138.  
  139.         A /dev/fd0 12 0 0 0
  140.         A /dev/fd0 12 40 2 9
  141.         B /dev/fd1 12 0 0 0
  142.         B /dev/fd1 12 40 2 9
  143.         C /dev/hda1 16 0 0 0
  144.         D /dev/hda6 16 0 0 0
  145.  
  146.     which is the default one contained in mtools.etc in this directory,
  147.     and that is designed for Linux.
  148.  
  149.     If you choose to hardcode the devices in, by not defining LOADDEVS,
  150.     but one of DELL, ..., the following are typical choices:
  151.  
  152.     for Interactive 386ix 2.0.2 with:
  153.         1.2m 5.25" as a: (supports 1.2m, 360k, and 320k)
  154.         1.44m 3.5" as b: (supports 1.44m, 720k)
  155.         hard disk partition as c:
  156.         vpix disk image as d:
  157.         user's vpix disk image as e:
  158.  
  159.         {'A', "/dev/rdsk/f0q15dt", 0L, 12, 0, (int (*)()) 0, 80, 2, 15},
  160.         {'A', "/dev/rdsk/f0d9dt", 0L, 12, 0, (int (*)()) 0, 40, 2, 9},
  161.         {'A', "/dev/rdsk/f0d8dt", 0L, 12, 0, (int (*)()) 0, 40, 2, 8},
  162.         {'B', "/dev/rdsk/f13ht", 0L, 12, 0, (int (*)()) 0, 80, 2, 18},
  163.         {'B', "/dev/rdsk/f13dt", 0L, 12, 0, (int (*)()) 0, 80, 2, 9},
  164.         {'C', "/dev/rdsk/0p1", 0L, 16, 0, (int (*)()) 0, 0, 0, 0},
  165.         {'D', "/usr/vpix/defaults/C:", 8704L, 12, 0, (int (*)()) 0, 0, 0, 0},
  166.         {'E', "$HOME/vpix/C:", 8704L, 12, 0, (int (*)()) 0, 0, 0, 0},
  167.         {'\0', (char *) NULL, 0L, 0, 0, (int (*)()) 0, 0, 0, 0}
  168.  
  169.  
  170.     for AT&T Unixpc 7300/3b1 with:
  171.         360k 5.25" as a: (supports 360k, and 320k, 180k, 160k)
  172.         DOS73 disk image as c:
  173.  
  174.         {'A', "/dev/rfp020", 0L, 12, O_NDELAY, init_unixpc, 40, 2, 9},
  175.         {'C', "/usr/bin/DOS/dvd000", 0L, 12, 0, (int (*)()) 0, 0, 0, 0},
  176.         {'\0', (char *) NULL, 0L, 0, 0, (int (*)()) 0, 0, 0, 0}
  177.  
  178.  
  179.     for Sun SparcStation with:
  180.         1.44m 3.5" as a: (supports 1.44m and 720k)
  181.  
  182.         {'A', "/dev/rfd0c", 0L, 12, 0, (int (*)()) 0, 80, 2, 18},
  183.         {'A', "/dev/rfd0c", 0L, 12, 0, (int (*)()) 0, 80, 2, 9},
  184.         {'\0', (char *) NULL, 0L, 0, 0, (int (*)()) 0, 0, 0, 0}
  185.  
  186.         Note that the two devices are actually the same physical
  187.         device, and that only the number of sectors are
  188.         different.
  189.  
  190.     for Dell's SVR4 with:
  191.         5.25" 1.2m, 360k and 320k as a:
  192.         3.5" 1.44m, 720k as b:
  193.         dos partition as c:
  194.  
  195.         {'A', "/dev/rdsk/f0q15dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  196.         {'A', "/dev/rdsk/f0d9dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
  197.         {'A', "/dev/rdsk/f0d8dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 8},
  198.         {'B', "/dev/rdsk/f13ht", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  199.         {'B', "/dev/rdsk/f13dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  200.         {'C', "/dev/rdsk/dos", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
  201.         {'\0', (char *) NULL, 0L, 0, 0, (int (*)()) 0, 0, 0, 0}
  202.