dect
/
linux-2.6
Archived
13
0
Fork 0

[WATCHDOG] Documentation/watchdog/watchdog-api.txt - fix watchdog daemon

Fix the simple watchdog daemon program in Doc/watchdog/watchdog-api.txt
to build cleanly.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
This commit is contained in:
Randy Dunlap 2006-04-04 20:17:26 -07:00 committed by Wim Van Sebroeck
parent 7071e522a5
commit 92930d9e81
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ 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) {