diff options
author | Kazutaka YOKOTA <yokota@FreeBSD.org> | 1998-08-03 09:09:35 +0000 |
---|---|---|
committer | Kazutaka YOKOTA <yokota@FreeBSD.org> | 1998-08-03 09:09:35 +0000 |
commit | 30f3a4598b1cb45c4ca55512eea15f184b786f82 (patch) | |
tree | 7e1473510fea4df08c84251f16dd5919780d57e3 /sys/isa/syscons.c | |
parent | cf94fb21249b747441d34be0079603dac2b9d7d0 (diff) |
- Add new bell types: "quiet.normal" and "quiet.visual".
When bell is of "quiet" types, the console won't ring (or flush)
if the ringing process is in a background vty.
PR: i386/2853
- Modify the escape sequence 'ESC[=%d;%dB' so that bell pitch and
duration are set in hertz and msecs by kbdcontrol(1).
There will be a corresponding kbdcontrol patch.
PR: bin/6037
Submitted by: Kouichi Hirabayashi (kh@eve.mogami-wire.co.jp)
Notes
Notes:
svn path=/head/; revision=38043
Diffstat (limited to 'sys/isa/syscons.c')
-rw-r--r-- | sys/isa/syscons.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 4c0c43d6dc08..98de0e41c564 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.266 1998/07/14 11:42:05 bde Exp $ + * $Id: syscons.c,v 1.267 1998/07/15 12:18:17 bde Exp $ */ #include "sc.h" @@ -1072,10 +1072,14 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) return 0; case CONS_BELLTYPE: /* set bell type sound/visual */ - if (*data) + if ((*(int *)data) & 0x01) flags |= VISUAL_BELL; else flags &= ~VISUAL_BELL; + if ((*(int *)data) & 0x02) + flags |= QUIET_BELL; + else + flags &= ~QUIET_BELL; return 0; case CONS_HISTORY: /* set history size */ @@ -3070,7 +3074,7 @@ scan_esc(scr_stat *scp, u_char c) case 'B': /* set bell pitch and duration */ if (scp->term.num_param == 2) { scp->bell_pitch = scp->term.param[0]; - scp->bell_duration = scp->term.param[1]*10; + scp->bell_duration = scp->term.param[1]; } break; @@ -5121,6 +5125,9 @@ do_bell(scr_stat *scp, int pitch, int duration) if (cold) return; + if (scp != cur_console && (flags & QUIET_BELL)) + return; + if (flags & VISUAL_BELL) { if (blink_in_progress) return; |