6dbb8ed5bb
Also, follow the rules from watchdog(9) about what values to return in various situations (especially, don't touch *error when asked to set a non-zero timeout that isn't achievable on the hardware).