diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-28 16:03:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-28 16:03:06 -0700 |
commit | fffcb480e4224f25c965b93fa65541bfc7dd732e (patch) | |
tree | a48383b5487798cdcc0153e342d6d88abe71333d /Documentation/watchdog/src/watchdog-simple.c | |
parent | b44597906e03d5e2b467c17a3b73585596c0d7be (diff) | |
parent | 56fb9e5346b99bc6b77def79b3739097bc13ea8a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
[WATCHDOG] Documentation/watchdog update
[WATCHDOG] convert AT91RM9200 watchdog to platform driver
[WATCHDOG] add WDIOC_GETTIMELEFT ioctl
[WATCHDOG] Pre-Timeout flags
Diffstat (limited to 'Documentation/watchdog/src/watchdog-simple.c')
-rw-r--r-- | Documentation/watchdog/src/watchdog-simple.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c new file mode 100644 index 00000000000..85cf17c4866 --- /dev/null +++ b/Documentation/watchdog/src/watchdog-simple.c @@ -0,0 +1,15 @@ +#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); + fsync(fd); + sleep(10); + } +} |