From: Andy Whitcroft Date: Thu, 15 Jan 2009 21:50:52 +0000 (-0800) Subject: sysrq: add commentary on why we use the console loglevel over using KERN_EMERG X-Git-Tag: v2.6.29-rc2~54 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=fb144adc517d9ebe8fd8d98a5696fb68ec91e1f5;p=linux-2.6-omap-h63xx.git 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: Andy Whitcroft Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index d41b9f6f790..33a9351c896 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -473,6 +473,12 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) unsigned long 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; console_loglevel = 7; printk(KERN_INFO "SysRq : ");