From: Mark Rustad Date: Thu, 10 Jul 2008 19:27:11 +0000 (-0500) Subject: [PATCH] IPMI: return correct value from ipmi_write X-Git-Tag: v2.6.26~18^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3976df9b04c113ab19dc0268e49c6cec6baf28f7;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Corey Minyard Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 1b9a8704781..0e6df289cb4 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, rv = ipmi_heartbeat(); if (rv) return rv; - return 1; } - return 0; + return len; } static ssize_t ipmi_read(struct file *file,