Skip to content
Snippets Groups Projects
Commit 92930d9e authored by Randy Dunlap's avatar Randy Dunlap Committed by Wim Van Sebroeck
Browse files

[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
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment