2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-05 08:45:26 +00:00

Fix loading of the cpuid module. On non-udev systems, or even on udev

systems where /dev/cpu/0/cpuid is part of the static device node tree,
the previous test would succeed even when the cpuid module isn't
loaded, resulting in missing detections (of coretemp-supported CPU
models in particuler.) Check if the module is loaded by looking in
sysfs instead, this is much more reliable.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5993 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2011-08-25 19:28:13 +00:00
parent 0cc29fa84f
commit 535e73df7a
2 changed files with 2 additions and 1 deletions

View File

@@ -6615,7 +6615,7 @@ sub main
"Do you want to scan for them? This is totally safe. (YES/no): ";
unless (<STDIN> =~ /^\s*n/i) {
# Load the cpuid driver if needed
unless (-e "/dev/cpu/$cpu[0]->{nr}/cpuid") {
unless (-e "$sysfs_root/class/cpuid") {
load_module("cpuid");
udev_settle();
}