X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-kexec/blobdiff_plain/1109a23f956da8bcd71c6430020e0321d7469069..e14c6eae15c85ae74d5a5b1dec3975eccf0fb337:/sys.c diff --git a/sys.c b/sys.c index 23eb124..d637180 100644 --- 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 1 static struct notifier_block dummy_notifier_reboot = { .notifier_call = NULL, .next = NULL, @@ -53,10 +54,17 @@ static struct notifier_block dummy_notifier_reboot = { }; BLOCKING_NOTIFIER_HEAD(notifier_head); +#endif void kernel_restart_prepare(char *cmd) { +#if 0 +#warning assuming kernel_restart_prepare is at 0xc00779cc + void (*original_kernel_restart_prepare)(char *) = (void (*)(char *))0xc00779cc; + //void (*original_kernel_restart_prepare)(char *) = (void (*)(char *))KERNEL_RESTART_PREPARE; + return original_kernel_restart_prepare(cmd); +#else register_reboot_notifier(&dummy_notifier_reboot); notifier_head.head=dummy_notifier_reboot.next; unregister_reboot_notifier(&dummy_notifier_reboot); @@ -65,6 +73,7 @@ void kernel_restart_prepare(char *cmd) system_state = SYSTEM_RESTART; //device_shutdown(); //sysdev_shutdown(); +#endif } /*