From 564905afa42095ac74577634db65f902f2533c31 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 22 May 2011 14:11:29 +0200 Subject: [PATCH] call real kernel_restart_prepare --- sys.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/sys.c b/sys.c index 611276b..06b1c44 100644 --- a/sys.c +++ b/sys.c @@ -46,25 +46,11 @@ 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) { - register_reboot_notifier(&dummy_notifier_reboot); - notifier_head.head=dummy_notifier_reboot.next; - unregister_reboot_notifier(&dummy_notifier_reboot); - - blocking_notifier_call_chain(¬ifier_head, SYS_RESTART, cmd); - system_state = SYSTEM_RESTART; -// device_shutdown(); -// sysdev_shutdown(); +#warning assuming kernel_restart_prepare is at 0xc00779cc + void (*original_kernel_restart_prepare)(char *) = (void (*)(char *))0xc00779cc; + return original_kernel_restart_prepare(cmd); } /* -- 2.39.5