diff options
author | cognet <cognet@FreeBSD.org> | 2003-02-20 03:27:09 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2003-02-20 03:27:09 +0000 |
commit | c812b91a675fc33d56c494228f512aef76f65480 (patch) | |
tree | 208d12929d5ab4657e2ef171171c2b742bd23abc | |
parent | 8d83e0054ab608acac23820f5f52f41d1478bc07 (diff) | |
download | FreeBSD-src-c812b91a675fc33d56c494228f512aef76f65480.zip FreeBSD-src-c812b91a675fc33d56c494228f512aef76f65480.tar.gz |
Add a "hw.syscons.bell" sysctl, which can disable the bell at syscons level.
-rw-r--r-- | sys/dev/syscons/syscons.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 6a885c4..aad98aa 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -100,6 +100,7 @@ static char sc_malloc = FALSE; static int saver_mode = CONS_NO_SAVER; /* LKM/user saver */ static int run_scrn_saver = FALSE; /* should run the saver? */ +static int enable_bell = TRUE; /* enable beeper */ static long scrn_blank_time = 0; /* screen saver timeout value */ #ifdef DEV_SPLASH static int scrn_blanked; /* # of blanked screen */ @@ -113,6 +114,8 @@ SYSCTL_NODE(_hw, OID_AUTO, syscons, CTLFLAG_RD, 0, "syscons"); SYSCTL_NODE(_hw_syscons, OID_AUTO, saver, CTLFLAG_RD, 0, "saver"); SYSCTL_INT(_hw_syscons_saver, OID_AUTO, keybonly, CTLFLAG_RW, &sc_saver_keyb_only, 0, "screen saver interrupted by input only"); +SYSCTL_INT(_hw_syscons, OID_AUTO, bell, CTLFLAG_RW, &enable_bell, + 0, "enable bell"); #if !defined(SC_NO_FONT_LOADING) && defined(SC_DFLT_FONT) #include "font.h" #endif @@ -3530,7 +3533,7 @@ sc_paste(scr_stat *scp, u_char *p, int count) void sc_bell(scr_stat *scp, int pitch, int duration) { - if (cold || shutdown_in_progress) + if (cold || shutdown_in_progress || !enable_bell) return; if (scp != scp->sc->cur_scp && (scp->sc->flags & SC_QUIET_BELL)) |