From c2fae871699d453a8022c8e86a90d3e8d84f150e Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 24 Mar 2003 15:56:00 +0000 Subject: [PATCH] Don't call sysbeep() in sc_bell() if either duration or pitch is zero. Otherwise sysbeep() makes an annoying clicking sound on some systems. 'kbdcontrol -b off' just sets the duration and pitch to zero, it doesn't set the QUIET_BELL flag. Tested by: SorAlx PR: misc/41772 MFC after: 1 week --- sys/dev/syscons/syscons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index b6b8e6b0f2e..88c59e8b626 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -3547,7 +3547,7 @@ sc_bell(scr_stat *scp, int pitch, int duration) if (scp != scp->sc->cur_scp) scp->sc->blink_in_progress += 2; blink_screen(scp->sc->cur_scp); - } else { + } else if (duration != 0 && pitch != 0) { if (scp != scp->sc->cur_scp) pitch *= 2; sysbeep(pitch, duration);