From owner-freebsd-bugs Mon Mar 16 16:50:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA29573 for freebsd-bugs-outgoing; Mon, 16 Mar 1998 16:50:23 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA29496; Mon, 16 Mar 1998 16:50:10 -0800 (PST) (envelope-from gnats) Received: from eve.mogami-wire.co.jp (eve.mogami-wire.co.jp [210.161.93.162]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA24606 for ; Mon, 16 Mar 1998 16:40:29 -0800 (PST) (envelope-from kh@mogami-wire.co.jp) Received: (from kh@localhost) by eve.mogami-wire.co.jp (8.7.6+2.6Wbeta7/3.4Wbeta5-eve) id JAA13458; Tue, 17 Mar 1998 09:40:23 +0900 (JST) Message-Id: <199803170040.JAA13458@eve.mogami-wire.co.jp> Date: Tue, 17 Mar 1998 09:40:23 +0900 (JST) From: kh@mogami-wire.co.jp Reply-To: kh@mogami-wire.co.jp To: FreeBSD-gnats-submit@FreeBSD.ORG, kh@eve.mogami-wire.co.jp X-Send-Pr-Version: 3.2 Subject: bin/6037: kbdcontrol(1) and syscons device driver Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6037 >Category: bin >Synopsis: inconsistency between kbdcontrol(1) and syscons device driver. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 16 16:50:03 PST 1998 >Last-Modified: >Originator: Kouichi Hirabayashi >Organization: Mogami Wire & Cable Corp. >Release: FreeBSD 2.1.5-RELEASE i386 >Environment: system console >Description: Current kbdcontrol(1) manual has not enough information to set bel duration and pitch. Here is a possible patch to /usr/shar/ man/man1/kbdcontrol.1. *** ORGkbdcontrol.1 Tue Mar 17 08:37:25 1998 --- /usr/shar/man/man1/kbdcontrol.1 Tue Mar 17 08:47:45 1998 *************** *** 37,43 **** The following command line options are supported: .Bl -tag -width indent .It Fl b Ar duration.pitch | Ar belltype ! Set the bell duration and pitch values. If a .Ar belltype argument is specified, it may be one of --- 37,43 ---- The following command line options are supported: .Bl -tag -width indent .It Fl b Ar duration.pitch | Ar belltype ! Set the bell duration in 1/10 seconds and pitch in 838.1 nanoseconds. If a .Ar belltype argument is specified, it may be one of >How-To-Repeat: >Fix: But there is inconsistency between kbdcontrol(1) and syscons device drive as for their default value. bell duration ----------------------------------------------- /sys/i386/isa/syscons.c 50 miliseconds /usr/src/usr.sbin/kbdcontrol.c 100 miliseconds Perhaps more reasonable way is changing unit of pitch and duration to in hertz (pitch) and miliseconds (duration) as follow. *** ORGkbdcontrol.1 Tue Mar 17 08:37:25 1998 --- /usr/shar/man/man1/kbdcontrol.1 Tue Mar 17 08:47:45 1998 *************** *** 37,43 **** The following command line options are supported: .Bl -tag -width indent .It Fl b Ar duration.pitch | Ar belltype ! Set the bell duration and pitch values. If a .Ar belltype argument is specified, it may be one of --- 37,43 ---- The following command line options are supported: .Bl -tag -width indent .It Fl b Ar duration.pitch | Ar belltype ! Set the bell duration in miliseconds and pitch in hertz. If a .Ar belltype argument is specified, it may be one of *** ORGsyscons.c Tue Mar 17 08:51:25 1998 --- /sys/i386/isa/syscons.c Tue Mar 17 08:52:06 1998 *************** *** 2457,2463 **** 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; } break; --- 2457,2463 ---- 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]; } break; *** ORGkbdcontrol.c Tue Mar 17 08:53:10 1998 --- /usr/src/usr.sbin/kbdcontrol.c Tue Mar 17 08:59:33 1998 *************** *** 459,467 **** int bell, duration, pitch; if (!strcmp(opt, "visual")) ! bell = 1, duration = 1, pitch = 800; else if (!strcmp(opt, "normal")) ! bell = 0, duration = 1, pitch = 800; else { char *v1; --- 459,467 ---- int bell, duration, pitch; if (!strcmp(opt, "visual")) ! bell = 1, duration = 5, pitch = 800; else if (!strcmp(opt, "normal")) ! bell = 0, duration = 5, pitch = 800; else { char *v1; *************** *** 476,481 **** --- 476,484 ---- warnx("argument to -b must be DURATION.PITCH"); return; } + if (pitch != 0) + pitch = 1193182 / pitch; /* in Hz */ + duration /= 10; /* in 10 m sec */ } ioctl(0, CONS_BELLTYPE, &bell); >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message