Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
kernel
/
msm-5.4
/
56fb9e5346b99bc6b77def79b3739097bc13ea8a
/
.
/
Documentation
/
watchdog
/
src
/
watchdog-simple.c
blob: 85cf17c48669d73111ff14ae8490417425da7030 [
file
] [
log
] [
blame
]
#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
);
}
}