Subject: Re: Beep events [was: beep on halt]
To: Julio Merino <jmmv@menta.net>
From: Joel Wilsson <joelw@unix.se>
List: tech-kern
Date: 10/21/2002 17:26:54
The original patch added a total of about 15 lines of optional kernel
code. This is the 45:th (right now, when I count) email to the mailing
list about those 15 lines.
Why? What's so horrible about the original patch? Your latest patch
adds over 200 hundred lines. I think you should go back to the original
patch, because this is not something you really need (or want) to be
able to change at runtime.
Anyway, this bikeshed got silly about 40 emails ago.
Cheers,
joelw
Julio Merino wrote:
> Hello (again)
>
> According to what people has suggested and seen that this interests to
> several people, I've made some more changes to my patch.
>
> First, all variables go inside sysctl's kern. namespace. This is the most
> logical thought, as this can work in several platforms, not just i386 (to
> be implemented). Also, the beeps can be called from, for example, ddb or
> any other MI part of the kernel (as somebody said, when panic'ing or
> entering the debugger).
>
> So, this is what my sysctl reports now:
>
> $ sysctl -a | grep beep
> kern.beep.onhalt.count = 0
> kern.beep.onhalt.pitch = 1500
> kern.beep.onhalt.period = 250
> kern.beep.onreboot.count = 0
> kern.beep.onreboot.pitch = 1500
> kern.beep.onreboot.period = 250
>
> As before, all this stuff can be completely enabled/disabled by using the
> BEEP_EVENTS kernel option.
>
> The overload on the kernel is really small:
>
> $ cd /var/build/kernel/DARKSTAR
> $ ls -l netbsd
> -rwxr-xr-x 1 jmmv wheel 2045483 Oct 20 23:38 netbsd
> $ ls -l /netbsd
> -rwxr-xr-x 1 root wheel 2046170 Oct 20 23:26 /netbsd
> $ bc
> 2046170 - 2045483
> 687
>
> You see, 687 bytes...
>
> Attached is patches.tgz, which contains the kernel patch and sysctl patch.
> Probably, sysctl changes are wrong... well, I do not know enough this
> program's code.
>
> So, what do you think now? May this be send-pr'ed after the review?
>
> Thank you!
>