3 --- apcserial.c.orig Wed Apr 7 18:06:41 1999
4 +++ apcserial.c Fri Jan 7 18:54:39 2000
11 +#endif /* __NetBSD__ */
16 newtio.c_oflag = 0; /* Raw output */
17 newtio.c_lflag = 0; /* No local echo */
20 +#if defined(__freebsd__) || defined (__NetBSD__)
21 newtio.c_ispeed = DEFAULT_SPEED; /* Set input speed */
22 newtio.c_ospeed = DEFAULT_SPEED; /* Set output speed */
23 -#endif /* __freebsd__ */
24 +#endif /* __freebsd__ || __NetBSD__ */
26 /* w.p. This makes a non.blocking read() with 5 sec. timeout */
27 newtio.c_cc[VMIN] = 0;
30 char response[32]; /* w.p. */
40 - if ((((pwdf = fopen(PWRFAIL, "r" )) == NULL) &&
41 - (ups->mode.type != BK)) ||
42 - (((pwdf = fopen(PWRFAIL, "r" )) == NULL) &&
43 - (ups->LineUp != 0) && (ups->mode.type == BK))) {
45 - "%s: Attempting to kill the power!\n" \
46 - "%s: Nice TRY but not TODAY!\n" \
47 - "%s: Shutdown not called first.\n" \
48 - "%s: Bug found by Tom Kunicki\n",
49 - ups->argvalue, ups->argvalue,
50 - ups->argvalue, ups->argvalue);
54 if ((ups->class.type == SHAREMASTER) ||
55 (ups->class.type == SHARENETMASTER)) {
63 "%s: Attempting to kill the power!\n",
72 if (ups->mode.type <= SHAREBASIC) {
73 switch(ups->cable.type) {