Commit 92930d9e authored by Randy Dunlap's avatar Randy Dunlap Committed by Wim Van Sebroeck

[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: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 7071e522
...@@ -36,6 +36,9 @@ timeout or margin. The simplest way to ping the watchdog is to write ...@@ -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 some data to the device. So a very simple watchdog daemon would look
like this: like this:
#include <stdlib.h>
#include <fcntl.h>
int main(int argc, const char *argv[]) { int main(int argc, const char *argv[]) {
int fd=open("/dev/watchdog",O_WRONLY); int fd=open("/dev/watchdog",O_WRONLY);
if (fd==-1) { if (fd==-1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment