public

softdog autostart patch generated against gentoo kernver 2.6.38

  • Download Gist
softdog_autostart_linux-2.6.38-gentoo-r6.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
--- ../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;
}

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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.