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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user