]> err.no Git - linux-2.6/blobdiff - Documentation/watchdog/watchdog-api.txt
Merge branch 'upstream' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into...
[linux-2.6] / Documentation / watchdog / watchdog-api.txt
index d738ec25eaa482fdd0859434c54305123edd7af8..958ff3d48be3dd7288afa5e59b53cde05ccc8487 100644 (file)
@@ -34,22 +34,7 @@ activates as soon as /dev/watchdog is opened and will reboot unless
 the watchdog is pinged within a certain time, this time is called the
 timeout or margin.  The simplest way to ping the watchdog is to write
 some data to the device.  So a very simple watchdog daemon would look
-like this:
-
-#include <stdlib.h>
-#include <fcntl.h>
-
-int main(int argc, const char *argv[]) {
-       int fd=open("/dev/watchdog",O_WRONLY);
-       if (fd==-1) {
-               perror("watchdog");
-               exit(1);
-       }
-       while(1) {
-               write(fd, "\0", 1);
-               sleep(10);
-       }
-}
+like this source file:  see Documentation/watchdog/src/watchdog-simple.c
 
 A more advanced driver could for example check that a HTTP server is
 still responding before doing the write call to ping the watchdog.