Date: Tue, 17 Mar 1998 09:40:23 +0900 (JST) From: kh@mogami-wire.co.jp To: FreeBSD-gnats-submit@FreeBSD.ORG, kh@eve.mogami-wire.co.jp Subject: bin/6037: kbdcontrol(1) and syscons device driver Message-ID: <199803170040.JAA13458@eve.mogami-wire.co.jp>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803170040.JAA13458>