ref: f97e856a1f1c836a94885038b4200f59c7011115
parent: b1469902d6f9656cc60b3788b51c424c0dec49ab
author: bentley <[email protected]>
date: Mon Jan 18 11:17:13 EST 2010
rgbfix: improve file open error message
--- a/src/fix/main.c
+++ b/src/fix/main.c
@@ -4,6 +4,7 @@
*/
#include <err.h>
+#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -614,7 +615,9 @@
}
fclose(f);
} else {
- errx(EX_NOINPUT, "File '%s' not found", filename);
+ fprintf(stderr, "Could not open file '%s' : %s\n", filename,
+ strerror(errno));
+ exit(EX_NOINPUT);
}
return (0);