lkml.org 
[lkml]   [1996]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Boot messages (Was: Re: Ideas for v2.1) (fwd)
Date
Nick Andrew (nick@zeta.org.au) écrit :

> I want to see boot messages - ugly, precise and informative.

[ and I agree with him completely. ]

> The next question becomes, how do we prevent the kernel from
> displaying the startup messages?

This is a one character change in kernel/printk.c. Set
DEFAULT_CONSOLE_LOGLEVEL to 1 and you'll get no single kernel message
on the console. This is sick, but it works. The messages are still
stored into the klog ring buffer, and are available to dmesg, klogd...

The following patch allows to set it using a kernel command-line
option (loglevel=N) where N is in 1..8 and is the default log level.

Now can we *please* drop this whole messages/animation/penguin noise
and get back to real development ?

diff -ur dist/linux-2.0/kernel/printk.c linux-2.0/kernel/printk.c
--- dist/linux-2.0/kernel/printk.c Sun Jun 9 23:51:25 1996
+++ linux-2.0/kernel/printk.c Fri Jun 21 17:21:52 1996
@@ -147,6 +147,14 @@
}


+asmlinkage void loglevel_setup (char *str, int *ints)
+{
+ if ((ints[0] == 1) && (ints[1] >= MINIMUM_CONSOLE_LOGLEVEL) &&
+ (ints[1] <= 8))
+ console_loglevel = ints[1];
+}
+
+
asmlinkage int printk(const char *fmt, ...)
{
va_list args;
diff -ur dist/linux-2.0/init/main.c linux-2.0/init/main.c
--- dist/linux-2.0/init/main.c Thu Jun 6 23:11:22 1996
+++ linux-2.0/init/main.c Fri Jun 21 16:54:40 1996
@@ -72,6 +72,7 @@
extern void swap_setup(char *str, int *ints);
extern void buff_setup(char *str, int *ints);
extern void panic_setup(char *str, int *ints);
+extern void loglevel_setup(char *str, int *ints);
extern void bmouse_setup(char *str, int *ints);
extern void msmouse_setup(char *str, int *ints);
extern void lp_setup(char *str, int *ints);
@@ -263,6 +264,7 @@
{ "swap=", swap_setup },
{ "buff=", buff_setup },
{ "panic=", panic_setup },
+ { "loglevel=", loglevel_setup },
{ "no-scroll", no_scroll },
#ifdef CONFIG_BUGi386
{ "no-hlt", no_halt },
--
Thomas.Quinot@Cuivre.FdN.FR <URL:http://Web.FdN.FR/~tquinot/>


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.147 / U:1.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site