mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[WATCHDOG] add WDIOC_GETTIMELEFT ioctl
Some watchdog drivers have the ability to report the remaining time before the system will reboot. With the WDIOC_GETTIMELEFT ioctl you can now read the time left before the watchdog would reboot your system. The following drivers support this new IOCTL: i8xx_tco.c, pcwd_pci.c and pcwd_usb.c . Signed-off-by: Wim Van Sebroeck <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
parent
e05b59fe79
commit
58b519f3e5
5 changed files with 92 additions and 5 deletions
|
|
@ -134,6 +134,15 @@ There is also a get function for getting the pretimeout:
|
|||
|
||||
Not all watchdog drivers will support a pretimeout.
|
||||
|
||||
Get the number of seconds before reboot:
|
||||
|
||||
Some watchdog drivers have the ability to report the remaining time
|
||||
before the system will reboot. The WDIOC_GETTIMELEFT is the ioctl
|
||||
that returns the number of seconds before reboot.
|
||||
|
||||
ioctl(fd, WDIOC_GETTIMELEFT, &timeleft);
|
||||
printf("The timeout was is %d seconds\n", timeleft);
|
||||
|
||||
Environmental monitoring:
|
||||
|
||||
All watchdog drivers are required return more information about the system,
|
||||
|
|
|
|||
Loading…
Reference in a new issue