Skip to content

Commit

Permalink
[PATCH] IPMI: return correct value from ipmi_write
Browse files Browse the repository at this point in the history
This patch corrects the handling of write operations to the IPMI watchdog
to work as intended by returning the number of characters actually
processed. Without this patch, an "echo V >/dev/watchdog" enables the
watchdog if IPMI is providing the watchdog function.

Signed-off-by: Mark Rustad <MRustad@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Mark Rustad authored and Wim Van Sebroeck committed Jul 11, 2008
1 parent 61ca9da commit 3976df9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/char/ipmi/ipmi_watchdog.c
Expand Up @@ -755,9 +755,8 @@ static ssize_t ipmi_write(struct file *file,
rv = ipmi_heartbeat();
if (rv)
return rv;
return 1;
}
return 0;
return len;
}

static ssize_t ipmi_read(struct file *file,
Expand Down

0 comments on commit 3976df9

Please sign in to comment.