aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-11 00:45:15 +0000
committerDavid Robillard <d@drobilla.net>2011-12-11 00:45:15 +0000
commit8a3108a907bd826b768894e9e91e82aa9c84bf63 (patch)
treec02cd342a003320e2206bb4fdb0e9370be71caf4
parent2f4cc718e4588701c02ab98beb17a1adc86431f8 (diff)
downloadserd-8a3108a907bd826b768894e9e91e82aa9c84bf63.tar.gz
serd-8a3108a907bd826b768894e9e91e82aa9c84bf63.tar.bz2
serd-8a3108a907bd826b768894e9e91e82aa9c84bf63.zip
Report reason for failure to open file in serdi.
git-svn-id: http://svn.drobilla.net/serd/trunk@233 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-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;
}
}