From 3976df9b04c113ab19dc0268e49c6cec6baf28f7 Mon Sep 17 00:00:00 2001 From: Mark Rustad Date: Thu, 10 Jul 2008 14:27:11 -0500 Subject: [PATCH] [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 --- drivers/char/ipmi/ipmi_watchdog.c | 3 +-- 1 file changed, 1 insertion(+), 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, rv = ipmi_heartbeat(); if (rv) return rv; - return 1; } - return 0; + return len; } static ssize_t ipmi_read(struct file *file, -- 2.20.1