Return zero when disabling watchdog, unless any of the drivers complain.
This commit is contained in:
parent
f4d4e417be
commit
ea8cbba64f
@ -55,9 +55,13 @@ wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data,
|
||||
return (EINVAL);
|
||||
if ((u & (WD_ACTIVE | WD_PASSIVE)) == (WD_ACTIVE | WD_PASSIVE))
|
||||
return (EINVAL);
|
||||
if ((u & WD_INTERVAL) == WD_TO_NEVER)
|
||||
|
||||
if ((u & WD_INTERVAL) == WD_TO_NEVER) {
|
||||
u = 0;
|
||||
error = EOPNOTSUPP;
|
||||
error = 0;
|
||||
} else {
|
||||
error = EOPNOTSUPP;
|
||||
}
|
||||
EVENTHANDLER_INVOKE(watchdog_list, u, &error);
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user