]> git.zerfleddert.de Git - ms2-kexec/commitdiff
Revert "call real kernel_restart_prepare"
authorMichael Gernoth <michael@gernoth.net>
Sun, 22 May 2011 21:51:37 +0000 (23:51 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sun, 22 May 2011 21:51:37 +0000 (23:51 +0200)
This reverts commit 564905afa42095ac74577634db65f902f2533c31.

sys.c

diff --git a/sys.c b/sys.c
index 06b1c443d3710f335fff6f2b5cb63442c8274444..611276bf10882c9f23704d02835fec9c0b88dc66 100644 (file)
--- a/sys.c
+++ b/sys.c
 
 extern asmlinkage long (*original_reboot)(int magic1, int magic2, unsigned int cmd, void __user *arg);
 
+static struct notifier_block dummy_notifier_reboot = {
+         .notifier_call  = NULL,
+         .next           = NULL,
+         .priority       = INT_MAX
+};
+
+BLOCKING_NOTIFIER_HEAD(notifier_head);
+
+
 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);
+       register_reboot_notifier(&dummy_notifier_reboot);
+       notifier_head.head=dummy_notifier_reboot.next;
+       unregister_reboot_notifier(&dummy_notifier_reboot);
+
+       blocking_notifier_call_chain(&notifier_head, SYS_RESTART, cmd);
+       system_state = SYSTEM_RESTART;
+//     device_shutdown();
+//     sysdev_shutdown();
 }
 
 /*
Impressum, Datenschutz