diff options
author | Seiji Aguchi <seiji.aguchi@hds.com> | 2011-01-12 19:59:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:07 -0500 |
commit | 04c6862c055fb687c90d9652f32c11a063df15cf (patch) | |
tree | b381c4c2005118f05ce8d2f3d363b73807c0eddf /kernel/printk.c | |
parent | fc2d557c74dc58294b9acc7231a2113ae59af97c (diff) |
kmsg_dump: add kmsg_dump() calls to the reboot, halt, poweroff and emergency_restart paths
We need to know the reason why system rebooted in support service.
However, we can't inform our customers of the reason because final
messages are lost on current Linux kernel.
This patch improves the situation above because the final messages are
saved by adding kmsg_dump() to reboot, halt, poweroff and
emergency_restart path.
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Marco Stornelli <marco.stornelli@gmail.com>
Reviewed-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index f64b8997fc76..0b0c9aa71e89 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -1539,6 +1539,10 @@ static const char * const kmsg_reasons[] = { | |||
1539 | [KMSG_DUMP_OOPS] = "oops", | 1539 | [KMSG_DUMP_OOPS] = "oops", |
1540 | [KMSG_DUMP_PANIC] = "panic", | 1540 | [KMSG_DUMP_PANIC] = "panic", |
1541 | [KMSG_DUMP_KEXEC] = "kexec", | 1541 | [KMSG_DUMP_KEXEC] = "kexec", |
1542 | [KMSG_DUMP_RESTART] = "restart", | ||
1543 | [KMSG_DUMP_HALT] = "halt", | ||
1544 | [KMSG_DUMP_POWEROFF] = "poweroff", | ||
1545 | [KMSG_DUMP_EMERG] = "emergency_restart", | ||
1542 | }; | 1546 | }; |
1543 | 1547 | ||
1544 | static const char *kmsg_to_str(enum kmsg_dump_reason reason) | 1548 | static const char *kmsg_to_str(enum kmsg_dump_reason reason) |