提交 fb144adc 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

sysrq: add commentary on why we use the console loglevel over using KERN_EMERG

Add an explanitory comment as to why we modify the kernel console loglevel
rather than simply moving sysrq messages to KERN_EMERG level.
Signed-off-by: NAndy Whitcroft <apw@canonical.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 47c33d9c
...@@ -473,6 +473,12 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) ...@@ -473,6 +473,12 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&sysrq_key_table_lock, flags); spin_lock_irqsave(&sysrq_key_table_lock, flags);
/*
* Raise the apparent loglevel to maximum so that the sysrq header
* is shown to provide the user with positive feedback. We do not
* simply emit this at KERN_EMERG as that would change message
* routing in the consumers of /proc/kmsg.
*/
orig_log_level = console_loglevel; orig_log_level = console_loglevel;
console_loglevel = 7; console_loglevel = 7;
printk(KERN_INFO "SysRq : "); printk(KERN_INFO "SysRq : ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册