1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)damaged.c	5.1 (Berkeley) 5/30/85";
   9: #endif not lint
  10: 
  11: # include   "trek.h"
  12: 
  13: /*  DAMAGED -- check for device damaged
  14: **
  15: **	This is a boolean function which returns non-zero if the
  16: **	specified device is broken.  It does this by checking the
  17: **	event list for a "device fix" action on that device.
  18: */
  19: 
  20: damaged(dev)
  21: int dev;
  22: {
  23:     register int        d;
  24:     register struct event   *e;
  25:     register int        i;
  26: 
  27:     d = dev;
  28: 
  29:     for (i = 0; i < MAXEVENTS; i++)
  30:     {
  31:         e = &Event[i];
  32:         if (e->evcode != E_FIXDV)
  33:             continue;
  34:         if (e->systemname == d)
  35:             return (1);
  36:     }
  37: 
  38:     /* device fix not in event list -- device must not be broken */
  39:     return (0);
  40: }
Last modified: 1985-05-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 852
Valid CSS Valid XHTML 1.0 Strict