diff --git a/CHANGES b/CHANGES index 391a6dc3..09aaf3f5 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ lm_sensors CHANGES file Add support for the IT8716F and IT8718F chips Add support for the W83793 chip (Yuan Mu) Map the 2.6 adm1026's fan8 to fan0 + Missing sysfs busses and classes are not errors Makefile: Don't grep autoconf.h on user-space targets Fix depmod on non-running kernel version Module i2c-ali1535: Drop redundant semaphore (2.6 backport) @@ -59,6 +60,7 @@ lm_sensors CHANGES file Add w83793 support (Yuan Mu) The adt7463 may not have in4 (#2119) Hide more vt1211 missing input errors + Clearer error messages when no sensors found Program sensors-detect: Add ServerWorks HT-1000 SMBus detection Add ATI IXP200/300/400 SMBus detection Prevent warning on 64-bit PCI addresses diff --git a/lib/sysfs.c b/lib/sysfs.c index 8a77bceb..c040a26b 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -112,12 +112,13 @@ static int sensors_read_sysfs_chips_compat(void) int ret = 0; if (!(bus = sysfs_open_bus("i2c"))) { - ret = -SENSORS_ERR_PROC; + if (errno && errno != ENOENT) + ret = -SENSORS_ERR_PROC; goto exit0; } if (!(devs = sysfs_get_bus_devices(bus))) { - if (errno) + if (errno && errno != ENOENT) ret = -SENSORS_ERR_PROC; goto exit1; } @@ -148,7 +149,7 @@ int sensors_read_sysfs_chips(void) } if (!(clsdevs = sysfs_get_class_devices(cls))) { - if (errno) + if (errno && errno != ENOENT) ret = -SENSORS_ERR_PROC; goto exit; } @@ -185,7 +186,7 @@ int sensors_read_sysfs_bus(void) } if (!(clsdevs = sysfs_get_class_devices(cls))) { - if (errno) + if (errno && errno != ENOENT) ret = -SENSORS_ERR_PROC; goto exit1; } diff --git a/prog/sensors/main.c b/prog/sensors/main.c index 40dbb038..c32e378b 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -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();