Better error message if configuration file can't be loaded.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4853 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-09-23 13:48:52 +00:00
1 parent 2fea711456
commit 4b6f9ee727
1 file changed
+4 -8
+4 -8
View File
@@ -79,10 +79,8 @@ loadConfig
if (!strcmp (cfgPath, "-")) {
if (!reload) {
if ((ret = sensors_init (stdin))) {
if (ret == -SENSORS_ERR_PROC)
sensorLog (LOG_ERR, "Error reading /proc or /sys; modules probably not loaded");
else
sensorLog (LOG_ERR, "Error %d loading sensors configuration file: <stdin>", ret);
sensorLog (LOG_ERR, "Error loading sensors configuration file <stdin>: %s",
sensors_strerror (ret));
ret = 12;
}
}
@@ -98,10 +96,8 @@ loadConfig
sensorLog (LOG_ERR, "Error opening sensors configuration file: %s", cfgPath);
ret = 11;
} else if ((ret = sensors_init (cfg))) {
if (ret == -SENSORS_ERR_PROC)
sensorLog (LOG_ERR, "Error reading /proc or /sys; modules probably not loaded");
else
sensorLog (LOG_ERR, "Error %d loading sensors configuration file: %s", ret, cfgPath);
sensorLog (LOG_ERR, "Error loading sensors configuration file %s: %s",
cfgPath, sensors_strerror (ret));
ret = 11;
} else {
cfgLastModified = stats.st_mtime;