diff options
author | jhb <jhb@FreeBSD.org> | 2003-03-24 15:56:00 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-03-24 15:56:00 +0000 |
commit | 392dc08fdbce805e06f7fc21852582b161da1e69 (patch) | |
tree | c02b1a70c70e5cfc66316d3cdc919c18cb0645bf /sys/dev/syscons | |
parent | 7e716ce8962c43ac646ac65ea2f909c0be0e8537 (diff) | |
download | FreeBSD-src-392dc08fdbce805e06f7fc21852582b161da1e69.zip FreeBSD-src-392dc08fdbce805e06f7fc21852582b161da1e69.tar.gz |
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 <soralx@cydem.zp.ua>
PR: misc/41772
MFC after: 1 week
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/syscons.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index b6b8e6b..88c59e8 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); |