Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malfaux/1062070 to your computer and use it in GitHub Desktop.
Save malfaux/1062070 to your computer and use it in GitHub Desktop.
softdog autostart patch generated against gentoo kernver 2.6.38
--- ../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;
}
@malfaux
Copy link
Author

malfaux commented Jul 3, 2011

for more information (description, installation, configuration, usage): go to https://github.com/malfaux/kernelpanic/wiki/Softdog-autostart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment