NAME

watchdog - hardware and software watchdog

SYNOPSIS

#include<sys/watchdog.h>

DESCRIPTION

The watchdog facility is used for controlling hardware and software
watchdogs.
/dev/fido responds to a single ioctl(2) call, WDIOCPATPAT. It takes a
single argument which represents a timeout value specified as a power of
two nanoseconds, or-ed with a flag selecting active or passive control of
the watchdog.
WD_ACTIVE indicates that the watchdog will be kept from timing out from
userland, for instance by the watchdogd(8) daemon. WD_PASSIVE indicates
that the watchdog will be kept from timing out from the kernel.
The ioctl(2) call will return success if just one of the available
watchdog(9) implementations supports setting the timeout to the specified
timeout. This means that at least one watchdog is armed. If the call
fails, for instance if none of watchdog(9) implementations support the
timeout length, all watchdogs are disabled and must be explicitly re-
enabled.
To disable the watchdogs pass WD_TO_NEVER. If disarming the watchdog(s)
failed an error is returned. The watchdog might still be armed!

RETURNVALUES

The ioctl returns zero on success and non-zero on failure.
[EOPNOTSUPP] No watchdog present in the kernel (timeout value other
than 0).
[EOPNOTSUPP] Watchdog could not be disabled (timeout value of 0).
[EINVALID] Invalid flag combination passed.
[EINVALID] None of the watchdogs supports the requested timeout
value.