Skip to content

Commit

Permalink
[WATCHDOG] ipmi: add the standard watchdog timeout ioctls
Browse files Browse the repository at this point in the history
Add the standard IOCTLs to the IPMI driver for setting and getting
the pretimeout.  Tested by Benoit Guillon.

Signed off by: Corey Minyard <cminyard@mvista.com>
Cc: Benoit Guillon <guillon@thalescomputers.fr>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Corey Minyard authored and Wim Van Sebroeck committed Nov 28, 2007
1 parent 38ff6fd commit 783e6bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,15 @@ static int ipmi_ioctl(struct inode *inode, struct file *file,
return 0;

case WDIOC_SET_PRETIMEOUT:
case WDIOC_SETPRETIMEOUT:
i = copy_from_user(&val, argp, sizeof(int));
if (i)
return -EFAULT;
pretimeout = val;
return ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);

case WDIOC_GET_PRETIMEOUT:
case WDIOC_GETPRETIMEOUT:
i = copy_to_user(argp, &pretimeout, sizeof(pretimeout));
if (i)
return -EFAULT;
Expand Down

0 comments on commit 783e6bc

Please sign in to comment.