[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEN] Kexec: Disable crash keyhandler when no crash kernel is loaded.
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxxxxx> # Node ID de69059a1f0e375777cb94d94ab645725ea6c8c3 # Parent 3c7a6081f1a9e72948faa880166060613ff8e284 [XEN] Kexec: Disable crash keyhandler when no crash kernel is loaded. Also make the crash dump key capital-C rather than lowercase to make it harder to hit by mistake. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx> --- xen/common/kexec.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff -r 3c7a6081f1a9 -r de69059a1f0e xen/common/kexec.c --- a/xen/common/kexec.c Wed Dec 13 10:05:07 2006 +0000 +++ b/xen/common/kexec.c Wed Dec 13 11:29:09 2006 +0000 @@ -140,13 +140,21 @@ void machine_crash_kexec(void) static void do_crashdump_trigger(unsigned char key) { - printk("triggering crashdump\n"); - machine_crash_kexec(); + int pos = (test_bit(KEXEC_FLAG_CRASH_POS, &kexec_flags) != 0); + if ( test_bit(KEXEC_IMAGE_CRASH_BASE + pos, &kexec_flags) ) + { + printk("'%c' pressed -> triggering crashdump\n", key); + machine_crash_kexec(); + } + else + { + printk("'%c' pressed -> no crash kernel loaded -- not triggering crashdump\n", key); + } } static __init int register_crashdump_trigger(void) { - register_keyhandler('c', do_crashdump_trigger, "trigger a crashdump"); + register_keyhandler('C', do_crashdump_trigger, "trigger a crashdump"); return 0; } __initcall(register_crashdump_trigger); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |