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:
parent
c5fd774040
commit
a21c9cf83d
4
parser.c
4
parser.c
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user