#define WDIOC_GET_PRETIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 22, int)
#endif
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
-static int nowayout = 1;
-#else
-static int nowayout;
-#endif
-
static ipmi_user_t watchdog_user = NULL;
/* Default the timeout to 10 seconds. */
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;
struct ipmi_recv_msg *recv_msg,
int *send_heartbeat_now)
{
- struct kernel_ipmi_msg msg;
+ struct ipmi_msg msg;
unsigned char data[6];
int rv;
struct ipmi_system_interface_addr addr;
static int ipmi_heartbeat(void)
{
- struct kernel_ipmi_msg msg;
+ struct ipmi_msg msg;
int rv;
struct ipmi_system_interface_addr addr;
static void panic_halt_ipmi_heartbeat(void)
{
- struct kernel_ipmi_msg msg;
+ struct ipmi_msg msg;
struct ipmi_system_interface_addr addr;
{
int rv;
+ /* Can't seek (pwrite) on this device */
+ if (ppos != &file->f_pos)
+ return -ESPIPE;
+
if (len) {
rv = ipmi_heartbeat();
if (rv)
int rv = 0;
wait_queue_t wait;
+ /* Can't seek (pread) on this device */
+ if (ppos != &file->f_pos)
+ return -ESPIPE;
+
if (count <= 0)
return 0;
/* Don't start the timer now, let it start on the
first heartbeat. */
ipmi_start_timer_on_heartbeat = 1;
- return nonseekable_open(ino, filep);
+ return(0);
default:
return (-ENODEV);
{
if (iminor(ino)==WATCHDOG_MINOR)
{
- if (!nowayout) {
- ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
- ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
- }
+#ifndef CONFIG_WATCHDOG_NOWAYOUT
+ ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
+ ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
+#endif
ipmi_wdog_open = 0;
}