mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-29 21:08:19 +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:
1 parent
c9bd83748b
commit
94fa667c46
3 files changed
+13
-8
No files matched your search
+5
-4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user