|
@@ -13,6 +13,7 @@
|
|
|
#include <linux/watchdog.h>
|
|
#include <linux/watchdog.h>
|
|
|
|
|
|
|
|
int fd;
|
|
int fd;
|
|
|
|
|
+const char v = 'V';
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* This function simply sends an IOCTL to the driver, which in turn ticks
|
|
* This function simply sends an IOCTL to the driver, which in turn ticks
|
|
@@ -34,6 +35,7 @@ static void keep_alive(void)
|
|
|
|
|
|
|
|
static void term(int sig)
|
|
static void term(int sig)
|
|
|
{
|
|
{
|
|
|
|
|
+ write(fd, &v, 1);
|
|
|
close(fd);
|
|
close(fd);
|
|
|
printf("\nStopping watchdog ticks...\n");
|
|
printf("\nStopping watchdog ticks...\n");
|
|
|
exit(0);
|
|
exit(0);
|
|
@@ -89,6 +91,7 @@ int main(int argc, char *argv[])
|
|
|
sleep(ping_rate);
|
|
sleep(ping_rate);
|
|
|
}
|
|
}
|
|
|
end:
|
|
end:
|
|
|
|
|
+ write(fd, &v, 1);
|
|
|
close(fd);
|
|
close(fd);
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|