aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/serdi.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ad3433d..f2d7a14d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ serd (UNRELEASED) unstable; urgency=low
* Install man page to DATADIR (e.g. PREFIX/share/man, not PREFIX/man)
* Tolerate invalid characters in string literals by replacing with the
Unicode replacement character
+ * Report reason for failure to open file in serdi
-- David Robillard <d@drobilla.net> (UNRELEASED)
diff --git a/src/serdi.c b/src/serdi.c
index ef7d72cb..939b63d0 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -15,6 +15,7 @@
*/
#include <assert.h>
+#include <errno.h>
#include <stdlib.h>
#include <string.h>
@@ -165,7 +166,8 @@ main(int argc, char** argv)
}
in_fd = fopen((const char*)input, "r");
if (!in_fd) {
- fprintf(stderr, "Failed to open file %s\n", input);
+ fprintf(stderr, "Error opening file %s (%s)\n",
+ input, strerror(errno));
return 1;
}
}