From 535e73df7ad8759ea2af063a112f17897934f2c5 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 25 Aug 2011 19:28:13 +0000 Subject: [PATCH] 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 --- CHANGES | 1 + prog/detect/sensors-detect | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 661e783b..39f7ef4a 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,7 @@ SVN HEAD sensors-detect: Stop calling for PIIX5 SMBus testers Improve filtering of fake DMI data Print DMI system/product version if available + Fix loading of the cpuid module 3.3.1 (2011-07-21) isadump: Add support for word (16-bit) and long (32-bit) reads diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index d88b111a..e10dc9ff 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -6615,7 +6615,7 @@ sub main "Do you want to scan for them? This is totally safe. (YES/no): "; unless ( =~ /^\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(); }