From: Arkadiusz Miskiewicz <arekm@pld-linux.org>
To: linux-kernel <linux-kernel@vger.kernel.org>,
Corey Minyard <minyard@mvista.com>
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH]: convert ipmi_watchdog to also use module option nowayout as it's done in other watchdog drivers
Date: Wed, 28 Jul 2004 11:41:13 +0200 [thread overview]
Message-ID: <200407281141.13362.arekm@pld-linux.org> (raw)
Convert ipmi_watchdog to also use module option ,,nowayout'' as it's done in other watchdog drivers.
Signed-off-by: Arkadiusz Miskiewicz <arekm@pld-linux.org>
--- linux.org/drivers/char/ipmi/ipmi_watchdog.c.org 2004-07-28 11:29:47.300755696 +0200
+++ linux/drivers/char/ipmi/ipmi_watchdog.c 2004-07-28 11:33:25.537578656 +0200
@@ -129,6 +129,12 @@
#define WDIOC_GET_PRETIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 22, int)
#endif
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
static ipmi_user_t watchdog_user = NULL;
/* Default the timeout to 10 seconds. */
@@ -175,6 +181,8 @@
module_param(start_now, int, 0);
MODULE_PARM_DESC(start_now, "Set to 1 to start the watchdog as"
"soon as the driver is loaded.");
+module_param(nowayout, int, 0);
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
/* Default state of the timer. */
static unsigned char ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
@@ -704,10 +712,10 @@
{
if (iminor(ino)==WATCHDOG_MINOR)
{
-#ifndef CONFIG_WATCHDOG_NOWAYOUT
- ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
- ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
-#endif
+ if (!nowayout) {
+ ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
+ ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
+ }
ipmi_wdog_open = 0;
}
--
Arkadiusz Miśkiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux
next reply other threads:[~2004-07-28 9:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-28 9:41 Arkadiusz Miskiewicz [this message]
2004-07-28 14:16 ` [PATCH]: convert ipmi_watchdog to also use module option nowayout as it's done in other watchdog drivers Corey Minyard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200407281141.13362.arekm@pld-linux.org \
--to=arekm@pld-linux.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox