1: /*
   2:  * Device tables.  See the Configure file for a complete description.
   3:  */
   4: 
   5: #include <stdio.h>
   6: #include "msdos.h"
   7: 
   8: struct device devices[] = {
   9:     {'A', "/dev/rra9a", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  10:     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  11: };
  12: 
  13: #ifdef DELL
  14: struct device devices[] = {
  15:     {'A', "/dev/rdsk/f0d9dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
  16:     {'A', "/dev/rdsk/f0q15dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  17:     {'A', "/dev/rdsk/f0d8dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 8},
  18:     {'B', "/dev/rdsk/f13ht", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  19:     {'B', "/dev/rdsk/f13dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  20:     {'C', "/dev/rdsk/dos", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
  21:     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  22: };
  23: #endif /* DELL */
  24: 
  25: #ifdef ISC
  26: struct device devices[] = {
  27:     {'A', "/dev/rdsk/f0d9dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 9},
  28:     {'A', "/dev/rdsk/f0q15dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
  29:     {'A', "/dev/rdsk/f0d8dt", 0L, 12, 0, (int (*) ()) 0, 40, 2, 8},
  30:     {'B', "/dev/rdsk/f13ht", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  31:     {'B', "/dev/rdsk/f13dt", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  32:     {'C', "/dev/rdsk/0p1", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
  33:     {'D', "/usr/vpix/defaults/C:", 8704L, 12, 0, (int (*) ()) 0, 0, 0, 0},
  34:     {'E', "$HOME/vpix/C:", 8704L, 12, 0, (int (*) ()) 0, 0, 0, 0},
  35:     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  36: };
  37: #endif /* ISC */
  38: 
  39: #ifdef MASSCOMP
  40: struct device devices[] = {
  41:     {'A', "/dev/rflp", 0L, 12, 0, (int (*) ()) 0, 80, 2, 8},
  42:     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  43: };
  44: #endif /* MASSCOMP */
  45: 
  46: #ifdef SPARC
  47: struct device devices[] = {
  48:     {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  49:     {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  50:     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  51: };
  52: #endif /* SPARC */
  53: 
  54: #ifdef UNIXPC
  55: #include <sys/gdioctl.h>
  56: #include <fcntl.h>
  57: 
  58: int init_unixpc();
  59: 
  60: struct device devices[] = {
  61:     {'A', "/dev/rfp020", 0L, 12, O_NDELAY, init_unixpc, 40, 2, 9},
  62:     {'C', "/usr/bin/DOS/dvd000", 0L, 12, 0, (int (*) ()) 0, 0, 0, 0},
  63:     {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  64: };
  65: 
  66: int
  67: init_unixpc(fd, ntracks, nheads, nsect)
  68: int fd, ntracks, nheads, nsect;
  69: {
  70:     struct gdctl gdbuf;
  71: 
  72:     if (ioctl(fd, GDGETA, &gdbuf) == -1) {
  73:         ioctl(fd, GDDISMNT, &gdbuf);
  74:         return(1);
  75:     }
  76: 
  77:     gdbuf.params.cyls = ntracks * nheads;
  78:     gdbuf.params.heads = nheads;
  79:     gdbuf.params.psectrk = nsect;
  80: 
  81:     gdbuf.params.pseccyl = gdbuf.params.psectrk * gdbuf.params.heads;
  82:     gdbuf.params.flags = 1;     /* disk type flag */
  83:     gdbuf.params.step = 0;      /* step rate for controller */
  84:     gdbuf.params.sectorsz = 512;    /* sector size */
  85: 
  86:     if (ioctl(fd, GDSETA, &gdbuf) < 0) {
  87:         ioctl(fd, GDDISMNT, &gdbuf);
  88:         return(1);
  89:     }
  90:     return(0);
  91: }
  92: #endif /* UNIXPC */

Defined functions

init_unixpc defined in line 66; used 2 times

Defined variables

devices defined in line 60; used 1 times
Last modified: 1992-06-27
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2308
Valid CSS Valid XHTML 1.0 Strict