If someone pressed a nonprintable character in getsn (eg in boot -c) the
authormaja <maja@openbsd.org>
Fri, 11 Apr 1997 21:18:02 +0000 (21:18 +0000)
committermaja <maja@openbsd.org>
Fri, 11 Apr 1997 21:18:02 +0000 (21:18 +0000)
speaker would be turned on but not off. So don't allow sysbeep until
timers works. -moj

sys/arch/arc/isa/isabus.c
sys/arch/i386/isa/clock.c

index acce947..4dfa984 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: isabus.c,v 1.9 1997/04/10 16:29:28 pefo Exp $ */
+/*     $OpenBSD: isabus.c,v 1.10 1997/04/11 21:18:02 maja Exp $        */
 /*     $NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp $     */
 
 /*-
@@ -504,6 +504,10 @@ sysbeep(pitch, period)
 {
        static int last_pitch, last_period;
        int s;
+       extern int cold;
+
+       if (cold)
+               return;         /* Can't beep yet. */
 
        if (beeping)
                untimeout(sysbeepstop, 0);
index ca6943d..9ed4839 100644 (file)
@@ -299,6 +299,10 @@ sysbeep(pitch, period)
        int pitch, period;
 {
        static int last_pitch;
+       extern int cold;
+
+       if (cold)
+               return;         /* Can't beep yet. */
 
        if (beeping)
                untimeout(sysbeepstop, 0);