feat: add config open error guide message

This commit is contained in:
javalsai 2025-06-08 13:50:28 +02:00
parent d36ef22c9a
commit 6975c265f0
Signed by: javalsai
SSH Key Fingerprint: SHA256:3G83yKhBUWVABVX/vPWH88xnK4+ptMtHkZGCRXD4Mk8

View File

@ -145,6 +145,9 @@ struct config* parse_config(char* path) {
FILE* fd = fopen(path, "r"); FILE* fd = fopen(path, "r");
if (fd == NULL || (stat(path, &sb) == -1)) { if (fd == NULL || (stat(path, &sb) == -1)) {
perror("fopen"); perror("fopen");
fprintf(stderr,
"Please place a config file at /etc/lidm.ini or set the LIDM_CONF "
"env variable");
return NULL; return NULL;
} }