mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-10 16:30:50 +00:00
Include the configuration file name when reporting parse errors.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5649 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
6a7286464d
commit
0efe346b80
9 files changed
+65
-19
No files matched your search
+3
-3
@@ -125,7 +125,7 @@ static int add_config_from_dir(const char *dir)
|
||||
|
||||
count = scandir(dir, &namelist, config_file_filter, alphasort);
|
||||
if (count < 0) {
|
||||
sensors_parse_error(strerror(errno), 0);
|
||||
sensors_parse_error_wfn(strerror(errno), NULL, 0);
|
||||
return -SENSORS_ERR_PARSE;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ static int add_config_from_dir(const char *dir)
|
||||
fclose(input);
|
||||
} else {
|
||||
res = -SENSORS_ERR_PARSE;
|
||||
sensors_parse_error(strerror(errno), 0);
|
||||
sensors_parse_error_wfn(strerror(errno), path, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ int sensors_init(FILE *input)
|
||||
goto exit_cleanup;
|
||||
|
||||
} else if (errno != ENOENT) {
|
||||
sensors_parse_error(strerror(errno), 0);
|
||||
sensors_parse_error_wfn(strerror(errno), name, 0);
|
||||
res = -SENSORS_ERR_PARSE;
|
||||
goto exit_cleanup;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user