]> git.zerfleddert.de Git - ms2-kexec/commitdiff
calling the real kernel_restart_prepare wasn't such a bad idea after all
authorMichael Gernoth <michael@gernoth.net>
Tue, 24 May 2011 22:12:21 +0000 (00:12 +0200)
committerMichael Gernoth <michael@gernoth.net>
Tue, 24 May 2011 22:12:21 +0000 (00:12 +0200)
sys.c

diff --git a/sys.c b/sys.c
index 23eb124f3cb40c1931dc6de2bcded082a39aa124..fd71e4fc445cffcf32f020cb843da14836686b83 100644 (file)
--- a/sys.c
+++ b/sys.c
@@ -46,6 +46,7 @@
 
 extern asmlinkage long (*original_reboot)(int magic1, int magic2, unsigned int cmd, void __user *arg);
 
+#if 0
 static struct notifier_block dummy_notifier_reboot = {
          .notifier_call  = NULL,
          .next           = NULL,
@@ -53,10 +54,15 @@ static struct notifier_block dummy_notifier_reboot = {
 };
 
 BLOCKING_NOTIFIER_HEAD(notifier_head);
+#endif
 
 
 void kernel_restart_prepare(char *cmd)
 {
+#warning assuming kernel_restart_prepare is at 0xc00779cc
+       void (*original_kernel_restart_prepare)(char *) = (void (*)(char *))0xc00779cc;
+       return original_kernel_restart_prepare(cmd);
+#if 0
        register_reboot_notifier(&dummy_notifier_reboot);
        notifier_head.head=dummy_notifier_reboot.next;
        unregister_reboot_notifier(&dummy_notifier_reboot);
@@ -65,6 +71,7 @@ void kernel_restart_prepare(char *cmd)
        system_state = SYSTEM_RESTART;
        //device_shutdown();
        //sysdev_shutdown();
+#endif
 }
 
 /*
Impressum, Datenschutz