mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
pstore/console: ignore log level
When printk to pstore console, we ignore log level. So /sys/fs/pstore/console-ramoops-0 should keep full kernel log. Change-Id: I87ea3418741c117523a9e872ae7ace4dac0cd9d3 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
parent
5eb1607259
commit
df8f6bcc81
|
|
@ -403,7 +403,11 @@ static void pstore_console_write(struct console *con, const char *s, unsigned c)
|
|||
static struct console pstore_console = {
|
||||
.name = "pstore",
|
||||
.write = pstore_console_write,
|
||||
#ifdef CON_PSTORE
|
||||
.flags = CON_PRINTBUFFER | CON_ENABLED | CON_ANYTIME | CON_PSTORE,
|
||||
#else
|
||||
.flags = CON_PRINTBUFFER | CON_ENABLED | CON_ANYTIME,
|
||||
#endif
|
||||
.index = -1,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,9 @@ static inline int con_debug_leave(void)
|
|||
#define CON_ANYTIME (16) /* Safe to call when cpu is offline */
|
||||
#define CON_BRL (32) /* Used for a braille device */
|
||||
#define CON_EXTENDED (64) /* Use the extended output format a la /dev/kmsg */
|
||||
#if defined(CONFIG_ARCH_ROCKCHIP) && defined(CONFIG_PSTORE_CONSOLE)
|
||||
#define CON_PSTORE (128) /* Print to pstore console anyway */
|
||||
#endif
|
||||
|
||||
struct console {
|
||||
char name[16];
|
||||
|
|
|
|||
|
|
@ -1442,12 +1442,19 @@ static void call_console_drivers(int level,
|
|||
|
||||
trace_console_rcuidle(text, len);
|
||||
|
||||
#ifndef CON_PSTORE
|
||||
if (level >= console_loglevel && !ignore_loglevel)
|
||||
return;
|
||||
#endif
|
||||
if (!console_drivers)
|
||||
return;
|
||||
|
||||
for_each_console(con) {
|
||||
#ifdef CON_PSTORE
|
||||
if (!(con->flags & CON_PSTORE) &&
|
||||
level >= console_loglevel && !ignore_loglevel)
|
||||
continue;
|
||||
#endif
|
||||
if (exclusive_console && con != exclusive_console)
|
||||
continue;
|
||||
if (!(con->flags & CON_ENABLED))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user