aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-applications/watchdog-test
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-applications/watchdog-test')
-rw-r--r--common/recipes-applications/watchdog-test/files/watchdog-test.c18
-rw-r--r--common/recipes-applications/watchdog-test/watchdog-test_1.0.bb2
2 files changed, 10 insertions, 10 deletions
diff --git a/common/recipes-applications/watchdog-test/files/watchdog-test.c b/common/recipes-applications/watchdog-test/files/watchdog-test.c
index 77124784..daedce98 100644
--- a/common/recipes-applications/watchdog-test/files/watchdog-test.c
+++ b/common/recipes-applications/watchdog-test/files/watchdog-test.c
@@ -111,7 +111,15 @@ void print_usage()
void parse_cmd(const char *cmdline)
{
- if (strncmp(cmdline, "help", 4) == 0)
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ printf("\nExiting...\n");
+ printf("\nIf the Watchdog Timer was not disabled, and you did not send the magic character,\n"
+ "Watchdog Timer is still ticking, and your system will reboot soon\n");
+
+ if(close(fd) < 0)
+ perror("Error closing /dev/watchdog");
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "help", 4) == 0)
print_usage();
else if (strncmp(cmdline, "disablewatchdog", 7) == 0) {
int flags;
@@ -243,14 +251,6 @@ void parse_cmd(const char *cmdline)
printf("Watchdog Timer will start counting down with the new timeout value\n");
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- printf("\nExiting...\n");
- printf("\nIf the Watchdog Timer was not disabled, and you did not send the magic character,\n"
- "Watchdog Timer is still ticking, and your system will reboot soon\n");
-
- if(close(fd) < 0)
- perror("Error closing /dev/watchdog");
- exit(EXIT_SUCCESS);
} else {
printf("\nUnknown command\n");
print_usage();
diff --git a/common/recipes-applications/watchdog-test/watchdog-test_1.0.bb b/common/recipes-applications/watchdog-test/watchdog-test_1.0.bb
index 43d511d0..f82fb651 100644
--- a/common/recipes-applications/watchdog-test/watchdog-test_1.0.bb
+++ b/common/recipes-applications/watchdog-test/watchdog-test_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Sample application for AMD Watchdog driver"
SECTION = "applications"
LICENSE = "BSD"
DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://watchdog-test.c;md5=47ff70acbf47e0bf894330dee1143414"
+LIC_FILES_CHKSUM = "file://watchdog-test.c;md5=1d81025de7376754875ee74378f07d7a"
PR = "r1"
PV = "1.0"