aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Rustad <Rustad@gmail.com>2008-07-10 15:27:11 -0400
committerWim Van Sebroeck <wim@iguana.be>2008-07-11 16:31:05 -0400
commit3976df9b04c113ab19dc0268e49c6cec6baf28f7 (patch)
tree64bf78123f100a037019035a9d719348c385e53e
parent61ca9daa2ca3022dc9cb22bd98e69c1b61e412ad (diff)
[PATCH] IPMI: return correct value from ipmi_write
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>
-rw-r--r--drivers/char/ipmi/ipmi_watchdog.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index 1b9a87047817..0e6df289cb46 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -755,9 +755,8 @@ static ssize_t ipmi_write(struct file *file,
755 rv = ipmi_heartbeat(); 755 rv = ipmi_heartbeat();
756 if (rv) 756 if (rv)
757 return rv; 757 return rv;
758 return 1;
759 } 758 }
760 return 0; 759 return len;
761} 760}
762 761
763static ssize_t ipmi_read(struct file *file, 762static ssize_t ipmi_read(struct file *file,