From a4938b083eab1160ab441be9e70d86a2e4a22266 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sun, 4 Aug 2019 17:53:13 -0400 Subject: add diagnositic for failure to open file --- strings.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/strings.c b/strings.c index 0256e3a..33d8dca 100644 --- a/strings.c +++ b/strings.c @@ -23,10 +23,12 @@ */ #define _POSIX_C_SOURCE 2 +#include +#include #include #include #include -#include +#include #include static int strings(const char *path, size_t number, char format) @@ -37,6 +39,7 @@ static int strings(const char *path, size_t number, char format) } if (f == NULL) { + fprintf(stderr, "strings: %s: %s\n", path, strerror(errno)); return 1; } -- cgit v1.2.1