diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 14:02:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 14:02:28 -0400 |
commit | e28d713704117bca0820c732210df6075b09f13b (patch) | |
tree | c2c8b2a40cb5081e8b6368eecc21220ee59903bf /kernel/printk.c | |
parent | 5fd29d6ccbc98884569d6f3105aeca70858b3e0f (diff) |
printk: Add KERN_DEFAULT printk log-level
This adds a KERN_DEFAULT loglevel marker, for when you cannot decide
which loglevel you want, and just want to keep an existing printk
with the default loglevel.
The difference between having KERN_DEFAULT and having no log-level
marker at all is two-fold:
- having the log-level marker will now force a new-line if the
previous printout had not added one (perhaps because it forgot,
but perhaps because it expected a continuation)
- having a log-level marker is required if you are printing out a
message that otherwise itself could perhaps otherwise be mistaken
for a log-level.
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index a87770ce73a2..b4d97b54c1ec 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -696,6 +696,8 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
696 | switch (c) { | 696 | switch (c) { |
697 | case '0' ... '7': /* loglevel */ | 697 | case '0' ... '7': /* loglevel */ |
698 | current_log_level = c - '0'; | 698 | current_log_level = c - '0'; |
699 | /* Fallthrough - make sure we're on a new line */ | ||
700 | case 'd': /* KERN_DEFAULT */ | ||
699 | if (!new_text_line) { | 701 | if (!new_text_line) { |
700 | emit_log_char('\n'); | 702 | emit_log_char('\n'); |
701 | new_text_line = 1; | 703 | new_text_line = 1; |