watchdog.4 (ffc4f93e960d38b6f70d59409127f7562e40f916) | watchdog.4 (a51584a2d2fb3731a68eaf93b59e14227e572427) |
---|---|
1.\" Copyright (c) 2004 Poul-Henning Kamp <phk@FreeBSD.org> 2.\" Copyright (c) 2003, 2004 Sean M. Kelly <smkelly@FreeBSD.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37facility is used for controlling hardware and software watchdogs. 38.Pp 39The device 40.Pa /dev/fido 41supports several optional 42.Xr ioctl 2 43calls for configuration, and 44responds to a single operational | 1.\" Copyright (c) 2004 Poul-Henning Kamp <phk@FreeBSD.org> 2.\" Copyright (c) 2003, 2004 Sean M. Kelly <smkelly@FreeBSD.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37facility is used for controlling hardware and software watchdogs. 38.Pp 39The device 40.Pa /dev/fido 41supports several optional 42.Xr ioctl 2 43calls for configuration, and 44responds to a single operational |
45.Xr ioctl | 45.Xr ioctl 2 |
46call, 47.Dv WDIOCPATPAT . 48It takes a single argument which represents a timeout value specified as a 49power of two nanoseconds, or-ed with a flag selecting active or passive control 50of the watchdog. 51.Pp 52.Dv WD_ACTIVE 53indicates that the --- 25 unchanged lines hidden (view full) --- 79.Pp 80To disable the watchdogs pass 81.Dv WD_TO_NEVER . 82If disarming the watchdog(s) failed an error is returned. 83The watchdog might 84still be armed! 85.Pp 86The optional configuration | 46call, 47.Dv WDIOCPATPAT . 48It takes a single argument which represents a timeout value specified as a 49power of two nanoseconds, or-ed with a flag selecting active or passive control 50of the watchdog. 51.Pp 52.Dv WD_ACTIVE 53indicates that the --- 25 unchanged lines hidden (view full) --- 79.Pp 80To disable the watchdogs pass 81.Dv WD_TO_NEVER . 82If disarming the watchdog(s) failed an error is returned. 83The watchdog might 84still be armed! 85.Pp 86The optional configuration |
87.Xr ioctl | 87.Xr ioctl 2 |
88commands are listed here, along with the type of the parameter used. 89Examples of their use can be found in 90.Xr watchdogd 8 . 91.Bl -tag -width "WDIOC_SETSOFTTIMEOUTACT int " 92.It Dv WDIOC_SETTIMEOUT Fa int 93set/reset the timer 94.It Dv WDIOC_GETTIMEOUT Fa int 95get total timeout --- 26 unchanged lines hidden (view full) --- 122.It Dv WD_SOFT_LOG 123log(9) 124.It Dv WD_SOFT_PRINT 125printf(9) 126.El 127.Sh RETURN VALUES 128The 129.Dv WDIOCPATPAT | 88commands are listed here, along with the type of the parameter used. 89Examples of their use can be found in 90.Xr watchdogd 8 . 91.Bl -tag -width "WDIOC_SETSOFTTIMEOUTACT int " 92.It Dv WDIOC_SETTIMEOUT Fa int 93set/reset the timer 94.It Dv WDIOC_GETTIMEOUT Fa int 95get total timeout --- 26 unchanged lines hidden (view full) --- 122.It Dv WD_SOFT_LOG 123log(9) 124.It Dv WD_SOFT_PRINT 125printf(9) 126.El 127.Sh RETURN VALUES 128The 129.Dv WDIOCPATPAT |
130.Xr ioctl | 130.Xr ioctl 2 |
131returns zero on success and non-zero on failure. 132.Bl -tag -width Er 133.It Bq Er EOPNOTSUPP 134No watchdog present in the kernel or 135none of the watchdogs supports the requested timeout value 136(timeout value other than 0). 137.It Bq Er EOPNOTSUPP 138Watchdog could not be disabled (timeout value of 0). 139.It Bq Er EINVAL 140Invalid flag combination passed. 141.El 142.Pp 143The configuration | 131returns zero on success and non-zero on failure. 132.Bl -tag -width Er 133.It Bq Er EOPNOTSUPP 134No watchdog present in the kernel or 135none of the watchdogs supports the requested timeout value 136(timeout value other than 0). 137.It Bq Er EOPNOTSUPP 138Watchdog could not be disabled (timeout value of 0). 139.It Bq Er EINVAL 140Invalid flag combination passed. 141.El 142.Pp 143The configuration |
144.Xr ioctl | 144.Xr ioctl 2 |
145operations return zero on success and non-zero on failure. 146.Sh EXAMPLES 147.Bd -literal -offset indent 148#include <paths.h> 149#include <sys/watchdog.h> 150 151#define WDPATH "/dev/" _PATH_WATCHDOG 152int wdfd = -1; --- 52 unchanged lines hidden --- | 145operations return zero on success and non-zero on failure. 146.Sh EXAMPLES 147.Bd -literal -offset indent 148#include <paths.h> 149#include <sys/watchdog.h> 150 151#define WDPATH "/dev/" _PATH_WATCHDOG 152int wdfd = -1; --- 52 unchanged lines hidden --- |