diff options
Diffstat (limited to 'tools/spi')
-rw-r--r-- | tools/spi/spidev_test.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c index 5866178cdcc9..27967dd90f8f 100644 --- a/tools/spi/spidev_test.c +++ b/tools/spi/spidev_test.c @@ -13,6 +13,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <errno.h> #include <getopt.h> #include <fcntl.h> #include <time.h> @@ -26,7 +27,11 @@ static void pabort(const char *s) { - perror(s); + if (errno != 0) + perror(s); + else + printf("%s\n", s); + abort(); } |