|
|
1.1 ! root 1: #ifndef lint ! 2: static char sccsid[] = "@(#)sc_conf.c 1.1 86/02/03 Copyr 1985 Sun Micro"; ! 3: #endif ! 4: ! 5: /* ! 6: * Copyright (c) 1985 by Sun Microsystems, Inc. ! 7: */ ! 8: ! 9: #include "si.h" ! 10: #include "sc.h" ! 11: #include "sd.h" ! 12: #include "st.h" ! 13: #include "sf.h" ! 14: ! 15: #if ((NSC > 0) || (NSI > 0)) ! 16: ! 17: #include "../h/types.h" ! 18: #include "../h/buf.h" ! 19: #include "../sun/dklabel.h" ! 20: #include "../sun/dkio.h" ! 21: #include "../sundev/screg.h" ! 22: #include "../sundev/sireg.h" ! 23: #include "../sundev/scsi.h" ! 24: ! 25: /* generic scsi debug flag */ ! 26: int scsi_debug = 0; ! 27: ! 28: /* ! 29: * If disks exist, declare unit structures for them. ! 30: */ ! 31: #if NSD > 0 ! 32: struct scsi_unit sdunits[NSD]; ! 33: struct scsi_disk sdisk[NSD]; ! 34: int nsdisk = NSD; ! 35: #endif NSD ! 36: ! 37: /* ! 38: * Same thing for tapes. ! 39: */ ! 40: #if NST > 0 ! 41: struct scsi_unit stunits[NST]; ! 42: struct scsi_tape stape[NST]; ! 43: int nstape = NST; ! 44: #endif NST ! 45: ! 46: /* ! 47: * Same thing for floppy disks. ! 48: */ ! 49: #if NSF > 0 ! 50: struct scsi_unit sfunits[NSF]; ! 51: struct scsi_floppy sfloppy[NSF]; ! 52: int nsfloppy = NSF; ! 53: #endif NSF ! 54: ! 55: struct mb_device *sdinfo[NSD + NST + NSF]; ! 56: ! 57: ! 58: /* ! 59: * Device specific subroutines. ! 60: * Indexed by "flag" from the configuration file, ! 61: * which is in mc_flag. ! 62: * Disk is 0, tape is 1. ! 63: */ ! 64: #if NSD > 0 ! 65: int sdattach(), sdstart(), sdmkcdb(), sdintr(), sdunitptr(); ! 66: #endif NSD > 0 ! 67: ! 68: #if NST > 0 ! 69: int stattach(), ststart(), stmkcdb(), stintr(), stunitptr(); ! 70: #endif NST > 0 ! 71: ! 72: #if NSF > 0 ! 73: int sfattach(), sfstart(), sfmkcdb(), sfintr(), sfunitptr(); ! 74: #endif NSF > 0 ! 75: ! 76: struct scsi_unit_subr scsi_unit_subr[] = { ! 77: #if NSD > 0 ! 78: { sdattach, sdstart, sdmkcdb, sdintr, sdunitptr, "sd", }, ! 79: #else ! 80: { (int (*)())0, (int (*)())0, (int (*)())0, (int (*)())0, (int (*)())0, ! 81: (char *)0}, ! 82: #endif NSD > 0 ! 83: ! 84: #if NST > 0 ! 85: { stattach, ststart, stmkcdb, stintr, stunitptr, "st", }, ! 86: #else ! 87: { (int (*)())0, (int (*)())0, (int (*)())0, (int (*)())0, (int (*)())0, ! 88: (char *)0}, ! 89: #endif NST > 0 ! 90: ! 91: #if NSF > 0 ! 92: { sfattach, sfstart, sfmkcdb, sfintr, sfunitptr, "sf", }, ! 93: #else ! 94: { (int (*)())0, (int (*)())0, (int (*)())0, (int (*)())0, (int (*)())0, ! 95: (char *)0}, ! 96: #endif NSF > 0 ! 97: }; ! 98: ! 99: /* ! 100: * Number of SCSI device driver types. ! 101: */ ! 102: int scsi_ntype = sizeof scsi_unit_subr / sizeof (struct scsi_unit_subr); ! 103: ! 104: #endif ((NSC > 0) || (NSI > 0))
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.