From: Ingo Molnar <mingo@elte.hu>
To: Nico Schottelius <nicos@pcsystems.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [ PATCH ]: disable pcspeaker kernel: 2.4.2 - 2.4.5
Date: Wed, 30 May 2001 14:21:34 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.33.0105301414080.6313-200000@localhost.localdomain> (raw)
In-Reply-To: <3B14E340.F1B19CA6@pcsystems.de>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 158 bytes --]
By making this (logical, and needed) feature unconditional, your patch's
size and complexity is reduced by 80%. (see the attached
pc_speaker.patch2)
Ingo
[-- Attachment #2: Type: TEXT/PLAIN, Size: 2135 bytes --]
diff -u --recursive linux-2.4.5/drivers/char/vt.c linux-2.4.5-nc/drivers/char/vt.c
--- linux-2.4.5/drivers/char/vt.c Fri Feb 9 20:30:22 2001
+++ linux-2.4.5-nc/drivers/char/vt.c Wed May 9 23:47:36 2001
@@ -40,6 +41,7 @@
#include <asm/vc_ioctl.h>
#endif /* CONFIG_FB_COMPAT_XPMAC */
+extern int pcspeaker_enabled;
char vt_dont_switch;
extern struct tty_driver console_driver;
@@ -112,6 +117,9 @@
unsigned int count = 0;
unsigned long flags;
+ /* is the pcspeaker enabled or disabled ? 0=disabled,1=enabled */
+ if (!pcspeaker_enabled)
+ return;
if (hz > 20 && hz < 32767)
count = 1193180 / hz;
diff -u --recursive linux-2.4.5/include/linux/sysctl.h linux-2.4.5-nc/include/linux/sysctl.h
--- linux-2.4.5/include/linux/sysctl.h Tue May 29 17:56:29 2001
+++ linux-2.4.5-nc/include/linux/sysctl.h Mon May 28 19:24:08 2001
@@ -118,7 +118,8 @@
KERN_SHMPATH=48, /* string: path to shm fs */
KERN_HOTPLUG=49, /* string: path to hotplug policy agent */
KERN_IEEE_EMULATION_WARNINGS=50, /* int: unimplemented ieee instructions */
- KERN_S390_USER_DEBUG_LOGGING=51 /* int: dumps of user faults */
+ KERN_S390_USER_DEBUG_LOGGING=51, /* int: dumps of user faults */
+ KERN_DISABLE_PC_SPEAKER=52 /* int: speaker on or off */
};
diff -u --recursive linux-2.4.5/kernel/sysctl.c linux-2.4.5-nc/kernel/sysctl.c
--- linux-2.4.5/kernel/sysctl.c Tue May 29 17:55:59 2001
+++ linux-2.4.5-nc/kernel/sysctl.c Wed May 9 23:44:30 2001
@@ -48,6 +49,7 @@
extern int nr_queued_signals, max_queued_signals;
extern int sysrq_enabled;
+int pcspeaker_enabled;
/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
static int maxolduid = 65535;
static int minolduid;
@@ -212,6 +217,8 @@
0444, NULL, &proc_dointvec},
{KERN_RTSIGMAX, "rtsig-max", &max_queued_signals, sizeof(int),
0644, NULL, &proc_dointvec},
+ {KERN_DISABLE_PC_SPEAKER, "pcspeaker", &pcspeaker_enabled, sizeof(int),
+ 0644, NULL, &proc_dointvec},
#ifdef CONFIG_SYSVIPC
{KERN_SHMMAX, "shmmax", &shm_ctlmax, sizeof (size_t),
0644, NULL, &proc_doulongvec_minmax},
next prev parent reply other threads:[~2001-05-30 12:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-30 12:10 Nico Schottelius
2001-05-30 12:21 ` Ingo Molnar [this message]
2001-05-30 12:52 ` Nico Schottelius
2001-05-30 13:50 ` Masoud Sharbiani
2001-05-30 14:00 Ingo Molnar
2001-05-30 14:27 ` Nico Schottelius
2001-05-30 15:25 ` Ingo Molnar
2001-05-30 21:32 ` Daniel Phillips
2001-05-31 12:55 ` Nico Schottelius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.33.0105301414080.6313-200000@localhost.localdomain \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=nicos@pcsystems.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®