aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-07-03 12:02:16 +0200
committerThomas White <taw@physics.org>2012-07-03 12:02:16 +0200
commitfa3a72ba31301b625eef3fc01c5a9d3fbf7ef296 (patch)
tree787fb9114ab6da61c2d83c268b69b3cb0d608b07 /src
parentac964c54628af8534b811466e68583ef6e685bd2 (diff)
Tweak error messages
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index e9ee0f7a..b09a00aa 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -416,17 +416,18 @@ static void process_image(const struct index_args *iargs,
fd = open(outfile, O_WRONLY);
if ( fd == -1 ) {
- ERROR("Error on opening\n");
+ ERROR("Couldn't open output stream ('%s').\n", outfile);
exit(1);
}
if ( fcntl(fd, F_SETLKW, &fl) == -1 ) {
- ERROR("Error on setting lock wait\n");
+ ERROR("Couldn't get lock on output stream.\n");
exit(1);
}
fh = fdopen(fd, "a");
if ( fh == NULL ) {
- ERROR("Couldn't open stream '%s'.\n", outfilename);
+ ERROR("Couldn't fdopen() the output stream.\n");
+ exit(1);
}
write_chunk(fh, &image, hdfile, iargs->stream_flags);
fflush(fh);