WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] merge

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Node ID 478ddc354ccdb815cbf94fda0201747ea5a7f299
# Parent  0c2816fb60b904fce4225004908856dae1585e3d
# Parent  de69059a1f0e375777cb94d94ab645725ea6c8c3
merge
---
 xen/common/kexec.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff -r 0c2816fb60b9 -r 478ddc354ccd xen/common/kexec.c
--- a/xen/common/kexec.c        Wed Dec 13 11:29:27 2006 +0000
+++ b/xen/common/kexec.c        Wed Dec 13 11:32:04 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

<Prev in Thread] Current Thread [Next in Thread>