Skip to content

Commit

Permalink
Convert loglevel-related kernel boot parameters to early_param
Browse files Browse the repository at this point in the history
So we can use them for the early console like console=uart8250 or
earlycon=uart8250 or early_printk

Signed-off-by: Yinghai Lu <[email protected]>
Cc: Andi Kleen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Yinghai Lu authored and Linus Torvalds committed Feb 8, 2008
1 parent 06b2a76 commit f6f21c8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,30 +238,26 @@ EXPORT_SYMBOL(loops_per_jiffy);

static int __init debug_kernel(char *str)
{
if (*str)
return 0;
console_loglevel = 10;
return 1;
return 0;
}

static int __init quiet_kernel(char *str)
{
if (*str)
return 0;
console_loglevel = 4;
return 1;
return 0;
}

__setup("debug", debug_kernel);
__setup("quiet", quiet_kernel);
early_param("debug", debug_kernel);
early_param("quiet", quiet_kernel);

static int __init loglevel(char *str)
{
get_option(&str, &console_loglevel);
return 1;
}

__setup("loglevel=", loglevel);
early_param("loglevel", loglevel);

/*
* Unknown boot options get handed to init, unless they look like
Expand Down

0 comments on commit f6f21c8

Please sign in to comment.