libsysfs 2.x bug affects libsensors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I just noticed that libsysfs 2.x has a bug (or at least a serious
mis-feature) which affects libsensors.

Since lm_sensors 2.10.0, libsensors relies on sysfs_get_mnt_path() to
find out whether sysfs is available or not, and fallbacks to procfs to
get the sensors data if it isn't. With libsysfs 1.x it worked fine, as
sysfs_get_mnt_path() would fail is sysfs wasn't mounted. However, since
libsysfs 2.0.0, sysfs_get_mnt_path() appears to succeed even if sysfs
isn't mounted. As a consequence, a sysfs-enabled libsensors will not
work on a 2.4 kernel. So there is currently no way to build libsensors
so that it'll work on both 2.4 and 2.6 kernels, unless you go back to
libsysfs 1.3.0.

I opened a bug on sourceforge:
http://sourceforge.net/tracker/index.php?func=detail&aid=1567053&group_id=44427&atid=439544

There are several quick fixes possible... Testing the string returned
by "uname -r", looking for sysfs in /proc/mounts, testing if /sys/bus
exists, or the other way around, testing if /proc/sys/dev/sensors
exists.

Or we could stop using libsysfs altogether...

-- 
Jean Delvare




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux