lkml.org 
[lkml]   [2007]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] vc bell config
    On Fri, 5 Oct 2007 13:55:52 +0200 (CEST)
    Jan Engelhardt <jengelh@computergmbh.de> wrote:

    >
    > It is already possible to deactivate the vc bell on a per-tty basis,
    > by using echo -en "\e[11;0]", but this is reset on reset(1).
    >
    > This adds a sysfs parameter to globally control the vc bell, as well
    > as sysfs parameters for default pitch and duration.
    >

    Why do we need this? To fix the stupid-app-makes-my-box-beep problem, I
    guess. Is there no other way of suppressing the beep? (no jokes about wire
    cutters or earplugs, please).


    > ---
    > drivers/char/vt.c | 18 +++++++++++-------
    > 1 file changed, 11 insertions(+), 7 deletions(-)
    >
    > Index: linux-2.6.23/drivers/char/vt.c
    > ===================================================================
    > --- linux-2.6.23.orig/drivers/char/vt.c
    > +++ linux-2.6.23/drivers/char/vt.c
    > @@ -134,8 +134,12 @@ const struct consw *conswitchp;
    > /*
    > * Here is the default bell parameters: 750HZ, 1/8th of a second
    > */
    > -#define DEFAULT_BELL_PITCH 750
    > -#define DEFAULT_BELL_DURATION (HZ/8)
    > +static unsigned int default_bell_pitch = 750;
    > +static unsigned int default_bell_duration = HZ / 8;

    It is inapt to call these default_X. Because once they have been altered
    by the user, they aren't defaults any more.

    They should be just bell_pitch and bell_duration.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-10-06 02:03    [W:0.024 / U:0.200 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site