mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
rgbfix: improve file open error message
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -614,7 +615,9 @@ main(int argc, char *argv[])
|
||||
}
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user