summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1998-08-03 09:09:35 +0000
committeryokota <yokota@FreeBSD.org>1998-08-03 09:09:35 +0000
commitc54fb2066b22309961c10122920190978bdfc104 (patch)
tree76d562d9a67e8156513023f1896b0130b459c064 /sys/isa
parentc4e1dd04fba1896d47ede3d3cecfb37038aa24f2 (diff)
downloadFreeBSD-src-c54fb2066b22309961c10122920190978bdfc104.zip
FreeBSD-src-c54fb2066b22309961c10122920190978bdfc104.tar.gz
- 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)
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/syscons.c13
-rw-r--r--sys/isa/syscons.h3
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c
index 4c0c43d..98de0e4 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;
diff --git a/sys/isa/syscons.h b/sys/isa/syscons.h
index bbb8a1c..e65aff4 100644
--- a/sys/isa/syscons.h
+++ b/sys/isa/syscons.h
@@ -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.h,v 1.36 1997/11/21 11:37:07 yokota Exp $
+ * $Id: syscons.h,v 1.37 1998/02/12 22:05:08 phk Exp $
*/
#ifndef _I386_ISA_SYSCONS_H_
@@ -73,6 +73,7 @@
#define DETECT_KBD 0x00008
#define XT_KEYBD 0x00010
#define KBD_NORESET 0x00020
+#define QUIET_BELL 0x00040
/* attribute flags */
#define NORMAL_ATTR 0x00
OpenPOWER on IntegriCloud