aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/recipes-applications/rtc-test/files/rtc-test.c10
-rw-r--r--common/recipes-applications/rtc-test/rtc-test_1.0.bb2
-rw-r--r--common/recipes-applications/smbus-test/files/smbus-test.c14
-rw-r--r--common/recipes-applications/smbus-test/smbus-test_1.0.bb2
-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
-rw-r--r--meta-amdfalconx86/recipes-applications/gpio-test/files/gpio-test.c56
-rw-r--r--meta-amdfalconx86/recipes-applications/gpio-test/gpio-test_1.0.bb2
-rw-r--r--meta-amdfalconx86/recipes-applications/spi-test/files/spirom-test.c10
-rw-r--r--meta-amdfalconx86/recipes-applications/spi-test/spi-test_1.0.bb2
-rw-r--r--meta-baldeagle/recipes-applications/gpio-test/files/gpio-test.c56
-rw-r--r--meta-baldeagle/recipes-applications/gpio-test/gpio-test_1.0.bb2
-rw-r--r--meta-baldeagle/recipes-applications/spi-test/files/spirom-test.c10
-rw-r--r--meta-baldeagle/recipes-applications/spi-test/spi-test_1.0.bb2
-rw-r--r--meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.c56
-rw-r--r--meta-steppeeagle/recipes-applications/gpio-test/gpio-test_1.0.bb2
-rw-r--r--meta-steppeeagle/recipes-applications/spi-test/files/spirom-test.c10
-rw-r--r--meta-steppeeagle/recipes-applications/spi-test/spi-test_1.0.bb2
18 files changed, 129 insertions, 129 deletions
diff --git a/common/recipes-applications/rtc-test/files/rtc-test.c b/common/recipes-applications/rtc-test/files/rtc-test.c
index 08088544..3411e4c8 100644
--- a/common/recipes-applications/rtc-test/files/rtc-test.c
+++ b/common/recipes-applications/rtc-test/files/rtc-test.c
@@ -182,7 +182,11 @@ void parse_cmd(const char *cmdline)
struct rtc_time rtc_time;
struct rtc_wkalrm rtc_wakealarm;
- if (strncmp(cmdline, "help", 4) == 0)
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ close(rtc_fd);
+ printf("\nExiting...\n");
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "help", 4) == 0)
print_usage();
else if (strncmp(cmdline, "updateinton", 11) == 0) {
int i;
@@ -453,10 +457,6 @@ void parse_cmd(const char *cmdline)
perror("RTC_PIE_OFF ioctl");
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- close(rtc_fd);
- printf("\nExiting...\n");
- exit(EXIT_SUCCESS);
} else {
printf("\nUnknown command\n");
print_usage();
diff --git a/common/recipes-applications/rtc-test/rtc-test_1.0.bb b/common/recipes-applications/rtc-test/rtc-test_1.0.bb
index 868c63c9..ee6b0eb2 100644
--- a/common/recipes-applications/rtc-test/rtc-test_1.0.bb
+++ b/common/recipes-applications/rtc-test/rtc-test_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Sample application for AMD RTC driver"
SECTION = "applications"
LICENSE = "BSD"
DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://rtc-test.c;md5=cdf9bfd59714d20025056dbfaaf31134"
+LIC_FILES_CHKSUM = "file://rtc-test.c;md5=ab350f4f921bfc19f7b7938a07f5688a"
PR = "r1"
PV = "1.0"
diff --git a/common/recipes-applications/smbus-test/files/smbus-test.c b/common/recipes-applications/smbus-test/files/smbus-test.c
index 128c5391..5178f798 100644
--- a/common/recipes-applications/smbus-test/files/smbus-test.c
+++ b/common/recipes-applications/smbus-test/files/smbus-test.c
@@ -122,7 +122,13 @@ void parse_cmd(const char *cmdline)
union i2c_smbus_data smbus_data;
unsigned long funcs;
- if (strncmp(cmdline, "enumerate", 9) == 0) {
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ printf("\nExiting...\n");
+ if((fd != -1) && (close(fd) < 0))
+ printf("Error closing device\n\n");
+
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "enumerate", 9) == 0) {
DIR *dir;
struct dirent *dir_entry;
int adapter_found = 0;
@@ -593,12 +599,6 @@ void parse_cmd(const char *cmdline)
fclose(file);
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- printf("\nExiting...\n");
- if((fd != -1) && (close(fd) < 0))
- printf("Error closing device\n\n");
-
- exit(EXIT_SUCCESS);
} else if (strncmp(cmdline, "help", 4) == 0) {
print_usage();
} else {
diff --git a/common/recipes-applications/smbus-test/smbus-test_1.0.bb b/common/recipes-applications/smbus-test/smbus-test_1.0.bb
index 2347b74d..5a959b85 100644
--- a/common/recipes-applications/smbus-test/smbus-test_1.0.bb
+++ b/common/recipes-applications/smbus-test/smbus-test_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Sample application for AMD SMBUS driver"
SECTION = "applications"
LICENSE = "BSD | GPLv2"
DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://smbus-test.c;md5=51840771157718d4d562329e476d6917 \
+LIC_FILES_CHKSUM = "file://smbus-test.c;md5=6e93b58b38eb7ba04529bb2b6c66ef70 \
file://i2c-dev.h;md5=11afa8583cd78137a63feb1a8b24cc51 \
"
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"
diff --git a/meta-amdfalconx86/recipes-applications/gpio-test/files/gpio-test.c b/meta-amdfalconx86/recipes-applications/gpio-test/files/gpio-test.c
index 6cd073bd..41a16765 100644
--- a/meta-amdfalconx86/recipes-applications/gpio-test/files/gpio-test.c
+++ b/meta-amdfalconx86/recipes-applications/gpio-test/files/gpio-test.c
@@ -109,7 +109,34 @@ void parse_cmd(const char *cmdline)
{
int fd;
- if (strncmp(cmdline, "help", 4) == 0)
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ int i;
+ int ret;
+ char gpio[3 + 1];
+
+ printf("\nExiting...\n");
+
+ /* We need to unexport all the GPIO pins exported earlier */
+ for (i = 0; i < AMD_GPIO_NUM_PINS; i++) {
+ if (gpio_in_use[i]) {
+ int fd;
+
+ fd = open("/sys/class/gpio/unexport", O_WRONLY);
+ if (fd < 0) {
+ printf("\nPlease make sure AMD GPIO driver is loaded\n");
+ exit(EXIT_FAILURE);
+ }
+ memset(gpio, '\0', (3 + 1));
+ snprintf(gpio, 4, "%d", i);
+
+ ret = write(fd, gpio, strlen(gpio));
+ if (ret < 0)
+ perror("Error writing to /sys/class/gpio/unexport");
+ }
+ }
+
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "help", 4) == 0)
print_usage();
else if (strncmp(cmdline, "getnumgpio", 10) == 0) {
int fd;
@@ -470,33 +497,6 @@ void parse_cmd(const char *cmdline)
perror("Error executing \'dmesg | grep GPIO\'");
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- int i;
- int ret;
- char gpio[3 + 1];
-
- printf("\nExiting...\n");
-
- /* We need to unexport all the GPIO pins exported earlier */
- for (i = 0; i < AMD_GPIO_NUM_PINS; i++) {
- if (gpio_in_use[i]) {
- int fd;
-
- fd = open("/sys/class/gpio/unexport", O_WRONLY);
- if (fd < 0) {
- printf("\nPlease make sure AMD GPIO driver is loaded\n");
- exit(EXIT_FAILURE);
- }
- memset(gpio, '\0', (3 + 1));
- snprintf(gpio, 4, "%d", i);
-
- ret = write(fd, gpio, strlen(gpio));
- if (ret < 0)
- perror("Error writing to /sys/class/gpio/unexport");
- }
- }
-
- exit(EXIT_SUCCESS);
} else {
printf("\nUnknown command\n");
print_usage();
diff --git a/meta-amdfalconx86/recipes-applications/gpio-test/gpio-test_1.0.bb b/meta-amdfalconx86/recipes-applications/gpio-test/gpio-test_1.0.bb
index f3f3e2e3..9b1c1f5a 100644
--- a/meta-amdfalconx86/recipes-applications/gpio-test/gpio-test_1.0.bb
+++ b/meta-amdfalconx86/recipes-applications/gpio-test/gpio-test_1.0.bb
@@ -3,7 +3,7 @@ SECTION = "applications"
LICENSE = "BSD"
DEPENDS = "readline"
LIC_FILES_CHKSUM = "\
- file://gpio-test.c;md5=e6e905de01cc60d7d588d095010cc904 \
+ file://gpio-test.c;md5=35bd4f849bf7b97ea60ecf724ff7d228 \
file://gpio-test.h;md5=c7aaa743b172cf584032f9bfc5e85044 \
"
diff --git a/meta-amdfalconx86/recipes-applications/spi-test/files/spirom-test.c b/meta-amdfalconx86/recipes-applications/spi-test/files/spirom-test.c
index 22c90036..d1eb4b5c 100644
--- a/meta-amdfalconx86/recipes-applications/spi-test/files/spirom-test.c
+++ b/meta-amdfalconx86/recipes-applications/spi-test/files/spirom-test.c
@@ -125,7 +125,11 @@ void parse_cmd(const char *cmdline)
int addr;
int ret;
- if (strncmp(cmdline, "enumerate", 9) == 0) {
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ printf("\nExiting...\n");
+ close(fd);
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "enumerate", 9) == 0) {
DIR *dir;
struct dirent *dir_entry;
int device_found = 0;
@@ -758,10 +762,6 @@ void parse_cmd(const char *cmdline)
close(infile_fd);
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- printf("\nExiting...\n");
- close(fd);
- exit(EXIT_SUCCESS);
} else if (strncmp(cmdline, "help", 4) == 0) {
print_usage();
} else {
diff --git a/meta-amdfalconx86/recipes-applications/spi-test/spi-test_1.0.bb b/meta-amdfalconx86/recipes-applications/spi-test/spi-test_1.0.bb
index 8824d55f..f83aa820 100644
--- a/meta-amdfalconx86/recipes-applications/spi-test/spi-test_1.0.bb
+++ b/meta-amdfalconx86/recipes-applications/spi-test/spi-test_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Sample application for AMD SPI driver"
SECTION = "applications"
LICENSE = "BSD"
DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://spirom-test.c;md5=73fa56dd9cc632c765154aa1c2f5b228 \
+LIC_FILES_CHKSUM = "file://spirom-test.c;md5=8dac97fc0527a3c7721fc257dd110445 \
file://spirom.h;md5=1990f1f1e7a82115c354152bed83df52 \
"
diff --git a/meta-baldeagle/recipes-applications/gpio-test/files/gpio-test.c b/meta-baldeagle/recipes-applications/gpio-test/files/gpio-test.c
index c12231ea..a36c821a 100644
--- a/meta-baldeagle/recipes-applications/gpio-test/files/gpio-test.c
+++ b/meta-baldeagle/recipes-applications/gpio-test/files/gpio-test.c
@@ -106,7 +106,34 @@ void parse_cmd(const char *cmdline)
{
int fd;
- if (strncmp(cmdline, "help", 4) == 0)
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ int i;
+ int ret;
+ char gpio[3 + 1];
+
+ printf("\nExiting...\n");
+
+ /* We need to unexport all the GPIO pins exported earlier */
+ for (i = 0; i < AMD_GPIO_NUM_PINS; i++) {
+ if (gpio_in_use[i]) {
+ int fd;
+
+ fd = open("/sys/class/gpio/unexport", O_WRONLY);
+ if (fd < 0) {
+ printf("\nPlease make sure AMD GPIO driver is loaded\n");
+ exit(EXIT_FAILURE);
+ }
+ memset(gpio, '\0', (3 + 1));
+ snprintf(gpio, 4, "%d", i);
+
+ ret = write(fd, gpio, strlen(gpio));
+ if (ret < 0)
+ perror("Error writing to /sys/class/gpio/unexport");
+ }
+ }
+
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "help", 4) == 0)
print_usage();
else if (strncmp(cmdline, "getnumgpio", 10) == 0) {
int fd;
@@ -514,33 +541,6 @@ out:
perror("Error executing \'dmesg | grep GPIO\'");
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- int i;
- int ret;
- char gpio[3 + 1];
-
- printf("\nExiting...\n");
-
- /* We need to unexport all the GPIO pins exported earlier */
- for (i = 0; i < AMD_GPIO_NUM_PINS; i++) {
- if (gpio_in_use[i]) {
- int fd;
-
- fd = open("/sys/class/gpio/unexport", O_WRONLY);
- if (fd < 0) {
- printf("\nPlease make sure AMD GPIO driver is loaded\n");
- exit(EXIT_FAILURE);
- }
- memset(gpio, '\0', (3 + 1));
- snprintf(gpio, 4, "%d", i);
-
- ret = write(fd, gpio, strlen(gpio));
- if (ret < 0)
- perror("Error writing to /sys/class/gpio/unexport");
- }
- }
-
- exit(EXIT_SUCCESS);
} else {
printf("\nUnknown command\n");
print_usage();
diff --git a/meta-baldeagle/recipes-applications/gpio-test/gpio-test_1.0.bb b/meta-baldeagle/recipes-applications/gpio-test/gpio-test_1.0.bb
index 6109a2d3..9d061528 100644
--- a/meta-baldeagle/recipes-applications/gpio-test/gpio-test_1.0.bb
+++ b/meta-baldeagle/recipes-applications/gpio-test/gpio-test_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Sample application for AMD GPIO driver"
SECTION = "applications"
LICENSE = "BSD"
DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://gpio-test.c;md5=39a7f24d8634a2dcba930899b58b0c5b"
+LIC_FILES_CHKSUM = "file://gpio-test.c;md5=662f6472a0d858aa3ce7d5f0c980647f"
PR = "r1"
PV = "1.0"
diff --git a/meta-baldeagle/recipes-applications/spi-test/files/spirom-test.c b/meta-baldeagle/recipes-applications/spi-test/files/spirom-test.c
index 9006c130..e4360992 100644
--- a/meta-baldeagle/recipes-applications/spi-test/files/spirom-test.c
+++ b/meta-baldeagle/recipes-applications/spi-test/files/spirom-test.c
@@ -125,7 +125,11 @@ void parse_cmd(const char *cmdline)
int addr;
int ret;
- if (strncmp(cmdline, "enumerate", 9) == 0) {
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ printf("\nExiting...\n");
+ close(fd);
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "enumerate", 9) == 0) {
DIR *dir;
struct dirent *dir_entry;
int device_found = 0;
@@ -758,10 +762,6 @@ void parse_cmd(const char *cmdline)
close(infile_fd);
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- printf("\nExiting...\n");
- close(fd);
- exit(EXIT_SUCCESS);
} else if (strncmp(cmdline, "help", 4) == 0) {
print_usage();
} else {
diff --git a/meta-baldeagle/recipes-applications/spi-test/spi-test_1.0.bb b/meta-baldeagle/recipes-applications/spi-test/spi-test_1.0.bb
index 2d75661b..888735c2 100644
--- a/meta-baldeagle/recipes-applications/spi-test/spi-test_1.0.bb
+++ b/meta-baldeagle/recipes-applications/spi-test/spi-test_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Sample application for AMD SPI driver"
SECTION = "applications"
LICENSE = "BSD"
DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://spirom-test.c;md5=3065341fac5fc1255711c219f00f7324 \
+LIC_FILES_CHKSUM = "file://spirom-test.c;md5=6f1b229427da2b3102f6328cd6c5be3c \
file://spirom.h;md5=dad84d1bbdd9852dde1fdf1ea3a014d6 \
"
diff --git a/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.c b/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.c
index 38c43276..9fc646b1 100644
--- a/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.c
+++ b/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.c
@@ -109,7 +109,34 @@ void parse_cmd(const char *cmdline)
{
int fd;
- if (strncmp(cmdline, "help", 4) == 0)
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ int i;
+ int ret;
+ char gpio[3 + 1];
+
+ printf("\nExiting...\n");
+
+ /* We need to unexport all the GPIO pins exported earlier */
+ for (i = 0; i < AMD_GPIO_NUM_PINS; i++) {
+ if (gpio_in_use[i]) {
+ int fd;
+
+ fd = open("/sys/class/gpio/unexport", O_WRONLY);
+ if (fd < 0) {
+ printf("\nPlease make sure AMD GPIO driver is loaded\n");
+ exit(EXIT_FAILURE);
+ }
+ memset(gpio, '\0', (3 + 1));
+ snprintf(gpio, 4, "%d", i);
+
+ ret = write(fd, gpio, strlen(gpio));
+ if (ret < 0)
+ perror("Error writing to /sys/class/gpio/unexport");
+ }
+ }
+
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "help", 4) == 0)
print_usage();
else if (strncmp(cmdline, "getnumgpio", 10) == 0) {
int fd;
@@ -517,33 +544,6 @@ out:
perror("Error executing \'dmesg | grep GPIO\'");
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- int i;
- int ret;
- char gpio[3 + 1];
-
- printf("\nExiting...\n");
-
- /* We need to unexport all the GPIO pins exported earlier */
- for (i = 0; i < AMD_GPIO_NUM_PINS; i++) {
- if (gpio_in_use[i]) {
- int fd;
-
- fd = open("/sys/class/gpio/unexport", O_WRONLY);
- if (fd < 0) {
- printf("\nPlease make sure AMD GPIO driver is loaded\n");
- exit(EXIT_FAILURE);
- }
- memset(gpio, '\0', (3 + 1));
- snprintf(gpio, 4, "%d", i);
-
- ret = write(fd, gpio, strlen(gpio));
- if (ret < 0)
- perror("Error writing to /sys/class/gpio/unexport");
- }
- }
-
- exit(EXIT_SUCCESS);
} else {
printf("\nUnknown command\n");
print_usage();
diff --git a/meta-steppeeagle/recipes-applications/gpio-test/gpio-test_1.0.bb b/meta-steppeeagle/recipes-applications/gpio-test/gpio-test_1.0.bb
index 246a1c97..8dec4293 100644
--- a/meta-steppeeagle/recipes-applications/gpio-test/gpio-test_1.0.bb
+++ b/meta-steppeeagle/recipes-applications/gpio-test/gpio-test_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Sample application for AMD GPIO driver"
SECTION = "applications"
LICENSE = "BSD"
DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://gpio-test.c;md5=cd7d02789bf5b4795b385ad4f2938469 \
+LIC_FILES_CHKSUM = "file://gpio-test.c;md5=c07e1063c9d11d0bafd9efb931ad6119 \
file://gpio-test.h;md5=c7aaa743b172cf584032f9bfc5e85044 \
"
diff --git a/meta-steppeeagle/recipes-applications/spi-test/files/spirom-test.c b/meta-steppeeagle/recipes-applications/spi-test/files/spirom-test.c
index 9006c130..091ced1a 100644
--- a/meta-steppeeagle/recipes-applications/spi-test/files/spirom-test.c
+++ b/meta-steppeeagle/recipes-applications/spi-test/files/spirom-test.c
@@ -125,7 +125,11 @@ void parse_cmd(const char *cmdline)
int addr;
int ret;
- if (strncmp(cmdline, "enumerate", 9) == 0) {
+ if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) {
+ printf("\nExiting...\n");
+ close(fd);
+ exit(EXIT_SUCCESS);
+ } else if (strncmp(cmdline, "enumerate", 9) == 0) {
DIR *dir;
struct dirent *dir_entry;
int device_found = 0;
@@ -758,10 +762,6 @@ void parse_cmd(const char *cmdline)
close(infile_fd);
} else if (strncmp(cmdline, "license", 7) == 0) {
show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- printf("\nExiting...\n");
- close(fd);
- exit(EXIT_SUCCESS);
} else if (strncmp(cmdline, "help", 4) == 0) {
print_usage();
} else {
diff --git a/meta-steppeeagle/recipes-applications/spi-test/spi-test_1.0.bb b/meta-steppeeagle/recipes-applications/spi-test/spi-test_1.0.bb
index b374d9f8..de404758 100644
--- a/meta-steppeeagle/recipes-applications/spi-test/spi-test_1.0.bb
+++ b/meta-steppeeagle/recipes-applications/spi-test/spi-test_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Sample application for AMD SPI driver"
SECTION = "applications"
LICENSE = "BSD"
DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://spirom-test.c;md5=3065341fac5fc1255711c219f00f7324 \
+LIC_FILES_CHKSUM = "file://spirom-test.c;md5=57b0b983cd8e62737e6ee55f5528a421 \
file://spirom.h;md5=8de0c535224dbd8ecd2f40ef29c15d0a \
"