Revision 5362a4ec830e0b5f4db59ad05fc32b10268abe91 authored by Christoph Hellwig on 08 May 2017, 13:04:45 UTC, committed by Anna Schumaker on 13 July 2017, 19:57:55 UTC
Declare the p_decode callbacks with the proper prototype instead of casting to kxdrdproc_t and losing all type safety. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jeff Layton <jlayton@redhat.com>
1 parent c56c620
watchdog-simple.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
int main(void)
{
int fd = open("/dev/watchdog", O_WRONLY);
int ret = 0;
if (fd == -1) {
perror("watchdog");
exit(EXIT_FAILURE);
}
while (1) {
ret = write(fd, "\0", 1);
if (ret != 1) {
ret = -1;
break;
}
sleep(10);
}
close(fd);
return ret;
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...