Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
parser: print errno when failing to open the config file
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA authored and emersion committed Jun 23, 2021
1 parent c5fd774 commit a21c9cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
FILE *f = fopen(path, "r");
if (f == NULL) {
fprintf(stderr, "failed to open file\n");
fprintf(stderr, "failed to open file %s: %s\n",
path,
strerror(errno));
return false;
}

Expand Down

0 comments on commit a21c9cf

Please sign in to comment.