1
0
mirror of https://github.com/emersion/kanshi synced 2024-11-23 00:02:16 +01:00

parser: print errno when failing to open the config file

This commit is contained in:
Antonin Décimo 2021-06-23 16:45:06 +02:00 committed by Simon Ser
parent c5fd774040
commit a21c9cf83d

@ -561,7 +561,9 @@ static bool _parse_config(struct kanshi_parser *parser, struct kanshi_config *co
static bool parse_config_file(const char *path, struct kanshi_config *config) { static bool parse_config_file(const char *path, struct kanshi_config *config) {
FILE *f = fopen(path, "r"); FILE *f = fopen(path, "r");
if (f == NULL) { if (f == NULL) {
fprintf(stderr, "failed to open file\n"); fprintf(stderr, "failed to open file %s: %s\n",
path,
strerror(errno));
return false; return false;
} }