diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2007-07-16 02:40:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:45 -0400 |
commit | e84845c4bf9a00533352e5805b35f42acdb04a1e (patch) | |
tree | d5791d8f19b97d8ae925cde32d59d53521e405a7 /kernel/printk.c | |
parent | 185848707e73382ba930857502a0b80ff6039967 (diff) |
add printk.time option, deprecate 'time'
Allow printk_time to be enabled or disabled at boot time. Previously it
could be enabled only, but not disabled.
Change printk_time from an int to a bool since that's what it is. Make its
logical (exposed) name just be "time" (was "printk_time").
Note: Changes kernel boot option syntax from "time" to "printk.time=value".
Since printk_time is declared as a module_param, it can also be
changed at run-time by modifying
/sys/module/printk/parameters/time
to a value of 1/Y/y to enabled it or 0/N/n to disable it.
Since printk_time is declared as a module_param, its value can also
be set at boot-time by using
linux printk.time=<bool>
If the "time" boot option is used, print a message that it is deprecated
and will be removed.
Note its planned removal in feature-removal-schedule.txt.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index f46cc6dff46e..fccacf706f53 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -449,13 +449,16 @@ static int printk_time = 1; | |||
449 | #else | 449 | #else |
450 | static int printk_time = 0; | 450 | static int printk_time = 0; |
451 | #endif | 451 | #endif |
452 | module_param(printk_time, int, S_IRUGO | S_IWUSR); | 452 | module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); |
453 | 453 | ||
454 | static int __init printk_time_setup(char *str) | 454 | static int __init printk_time_setup(char *str) |
455 | { | 455 | { |
456 | if (*str) | 456 | if (*str) |
457 | return 0; | 457 | return 0; |
458 | printk_time = 1; | 458 | printk_time = 1; |
459 | printk(KERN_NOTICE "The 'time' option is deprecated and " | ||
460 | "is scheduled for removal in early 2008\n"); | ||
461 | printk(KERN_NOTICE "Use 'printk.time=<value>' instead\n"); | ||
459 | return 1; | 462 | return 1; |
460 | } | 463 | } |
461 | 464 | ||