2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-04 08:15:13 +00:00

libsensors: Missing sysfs busses and classes are not errors. This tends

to confuse users a lot, to report the lack of hwmon driver as an error.
prog/sensors: Clearer error messages when no sensors are found. The
most frequent cause is a lack of drivers, not procfs/sysfs problems.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4159 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2006-09-19 10:01:12 +00:00
parent c9bd83748b
commit 94fa667c46
3 changed files with 13 additions and 8 deletions

View File

@@ -238,10 +238,9 @@ int main (int argc, char *argv[])
fprintf(stderr,"%s\n",sensors_strerror(res));
if (res == -SENSORS_ERR_PROC)
fprintf(stderr,
"Unable to find i2c bus information;\n"
"Kernel interface access error\n"
"For 2.6 kernels, make sure you have mounted sysfs and libsensors\n"
"was compiled with sysfs support!\n"
"For older kernels, make sure you have done 'modprobe i2c-proc'!\n");
"was compiled with sysfs support!\n");
exit(1);
}
@@ -256,7 +255,10 @@ int main (int argc, char *argv[])
exit(error);
} else {
if(chips[0].prefix == SENSORS_CHIP_NAME_PREFIX_ANY)
fprintf(stderr,"No sensors found!\n");
fprintf(stderr,
"No sensors found!\n"
"Make sure you loaded all the kernel drivers you need.\n"
"Try sensors-detect to find out which these are.\n");
else
fprintf(stderr,"Specified sensor(s) not found!\n");
sensors_cleanup();