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] [XEN] Kexec: Disable crash keyhandler whe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Kexec: Disable crash keyhandler when no crash kernel is loaded.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 17:35:17 +0000
Delivery-date: Wed, 13 Dec 2006 09:42:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Kexec: Disable crash keyhandler when no crash kernel is loaded., Xen patchbot-unstable <=