[PATCH] IPMI: return correct value from ipmi_write
authorMark Rustad <Rustad@gmail.com>
Thu, 10 Jul 2008 19:27:11 +0000 (14:27 -0500)
committerWim Van Sebroeck <wim@iguana.be>
Fri, 11 Jul 2008 20:31:05 +0000 (20:31 +0000)
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>
drivers/char/ipmi/ipmi_watchdog.c

index 1b9a8704781783d6e9f9f8416cc9ef6e07c280c6..0e6df289cb46e8202df710903278ebe6c1fb2a0c 100644 (file)
@@ -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,