Created
July 3, 2011 08:36
-
-
Save malfaux/1062070 to your computer and use it in GitHub Desktop.
softdog autostart patch generated against gentoo kernver 2.6.38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ../x/linux-2.6.38/drivers/watchdog/softdog.c 2011-03-15 01:20:32.000000000 +0000 | |
+++ ./drivers/watchdog/softdog.c 2011-06-15 18:44:44.000000000 +0000 | |
@@ -64,6 +64,13 @@ | |
"Watchdog cannot be stopped once started (default=" | |
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | |
+#define WATCHDOG_AUTOSTART 0 | |
+static int autostart = WATCHDOG_AUTOSTART; | |
+module_param(autostart,int,0); | |
+MODULE_PARM_DESC(autostart, | |
+ "Start the timer automagically on init (default=" | |
+ __MODULE_STRING(WATCHDOG_AUTOSTART) ")"); | |
+ | |
#ifdef ONLY_TESTING | |
static int soft_noboot = 1; | |
#else | |
@@ -267,7 +274,7 @@ | |
}; | |
static char banner[] __initdata = KERN_INFO "Software Watchdog Timer: 0.07 " | |
- "initialized. soft_noboot=%d soft_margin=%d sec (nowayout= %d)\n"; | |
+ "initialized. autostart=%d soft_noboot=%d soft_margin=%d sec (nowayout= %d)\n"; | |
static int __init watchdog_init(void) | |
{ | |
@@ -297,8 +304,9 @@ | |
unregister_reboot_notifier(&softdog_notifier); | |
return ret; | |
} | |
- | |
- printk(banner, soft_noboot, soft_margin, nowayout); | |
+ printk(banner, autostart, soft_noboot, soft_margin, nowayout); | |
+ if (autostart) | |
+ softdog_keepalive(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for more information (description, installation, configuration, usage): go to https://github.com/malfaux/kernelpanic/wiki/Softdog-autostart