aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-09-14 01:37:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-09-14 01:37:08 -0400
commita06b0c82a049d34d4dc273e8692ed0894458c468 (patch)
treebc6aed52b8b3d76ccdc36b51c12b1591ed21d5af /kernel
parent48751b562bce96c4284885571da1bdda7673f38e (diff)
parenta6ae928c25835ca18deb4a527079f169b68ed292 (diff)
Merge tag 'printk-for-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk
Pull printk fix from Petr Mladek: "Revert a commit that caused "quiet", "debug", and "loglevel" early parameters to be ignored for early boot messages" * tag 'printk-for-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: Revert "printk: make sure to print log on console."
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk/printk.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index fd6f8ed28e01..9bf5404397e0 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -351,7 +351,6 @@ static int console_msg_format = MSG_FORMAT_DEFAULT;
351 */ 351 */
352 352
353enum log_flags { 353enum log_flags {
354 LOG_NOCONS = 1, /* suppress print, do not print to console */
355 LOG_NEWLINE = 2, /* text ended with a newline */ 354 LOG_NEWLINE = 2, /* text ended with a newline */
356 LOG_PREFIX = 4, /* text started with a prefix */ 355 LOG_PREFIX = 4, /* text started with a prefix */
357 LOG_CONT = 8, /* text is a fragment of a continuation line */ 356 LOG_CONT = 8, /* text is a fragment of a continuation line */
@@ -1881,9 +1880,6 @@ int vprintk_store(int facility, int level,
1881 if (dict) 1880 if (dict)
1882 lflags |= LOG_PREFIX|LOG_NEWLINE; 1881 lflags |= LOG_PREFIX|LOG_NEWLINE;
1883 1882
1884 if (suppress_message_printing(level))
1885 lflags |= LOG_NOCONS;
1886
1887 return log_output(facility, level, lflags, 1883 return log_output(facility, level, lflags,
1888 dict, dictlen, text, text_len); 1884 dict, dictlen, text, text_len);
1889} 1885}
@@ -2032,6 +2028,7 @@ static void call_console_drivers(const char *ext_text, size_t ext_len,
2032 const char *text, size_t len) {} 2028 const char *text, size_t len) {}
2033static size_t msg_print_text(const struct printk_log *msg, 2029static size_t msg_print_text(const struct printk_log *msg,
2034 bool syslog, char *buf, size_t size) { return 0; } 2030 bool syslog, char *buf, size_t size) { return 0; }
2031static bool suppress_message_printing(int level) { return false; }
2035 2032
2036#endif /* CONFIG_PRINTK */ 2033#endif /* CONFIG_PRINTK */
2037 2034
@@ -2368,10 +2365,11 @@ skip:
2368 break; 2365 break;
2369 2366
2370 msg = log_from_idx(console_idx); 2367 msg = log_from_idx(console_idx);
2371 if (msg->flags & LOG_NOCONS) { 2368 if (suppress_message_printing(msg->level)) {
2372 /* 2369 /*
2373 * Skip record if !ignore_loglevel, and 2370 * Skip record we have buffered and already printed
2374 * record has level above the console loglevel. 2371 * directly to the console when we received it, and
2372 * record that has level above the console loglevel.
2375 */ 2373 */
2376 console_idx = log_next(console_idx); 2374 console_idx = log_next(console_idx);
2377 console_seq++; 2375 console_seq++;