|
|
@@ -252,6 +252,11 @@ static int parse_watchdog_command(const char *buf, size_t count)
|
|
|
if (count == 1 && (buf[0] == '0' || buf[0] == '1')) {
|
|
|
return buf[0] - '0';
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ if (count == 1 && (buf[0] == 0 || buf[0] == 1)) {
|
|
|
+ return buf[0];
|
|
|
+ }
|
|
|
|
|
|
/* Check for "ON" or "OFF" (case insensitive) */
|
|
|
if (count >= 2) {
|
|
|
@@ -290,11 +295,11 @@ static ssize_t watchdog_read(struct file *file, char __user *user_buf,
|
|
|
memset(status_buf, 0, sizeof(status_buf));
|
|
|
if( watchdog_state == 1)
|
|
|
{
|
|
|
- status_buf[0] = '1';
|
|
|
+ status_buf[0] = 1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- status_buf[0] = '0';
|
|
|
+ status_buf[0] = 0;
|
|
|
}
|
|
|
len = 1;
|
|
|
mutex_unlock(&watchdog_mutex);
|