Subject: Re: Getting rid of BEEP_ONHALT_*
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 02/24/2006 19:58:39
On Fri, Feb 24, 2006 at 06:34:16PM +0100, Julio M. Merino Vidal wrote:
> The problem is that the kernel has too many options. Many of them
> are useful and required, but I don't think being able to configure
> such minor things is a good idea, specially being build-time-only
> options... Things should 'just work' and be kept simple.
You can (and I gues that's what der Mouse tried to suggest implicitly)
simply use a default value for the pitch and length, but have them
overridable via the options. That way you only need BEEP_ONHALT, but
still could change the pitch with BEEP_ONHALT_PITCH.
I don't see a problem with compile time options for *this* type of things.
Making a sysctl out of it is certainly overkill. You could use a global
variable that gets initialized with the option value:
#ifdef BEEP_ONHALT
#ifndef BEEP_ONHALT_PITCH
#define BEEP_ONHALT_PITCH 1500
#endif
int beep_onhalt_pitch = BEEP_ONHALT_PITCH;
#endif
Then you can use gdb to change the value in the kernel binary w/o recompiling.
Martin