summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2008-12-05 10:00:32 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2008-12-05 10:00:32 +0000
commit28d487a1d36538a3c5acdac40b7833f3fb365f95 (patch)
treef2959fa4882ab60334b4d0ec5405b241fa3aece9
parentfaa38febfeecab30adbc34bd383eb40bb72005e9 (diff)
downloadlm-sensors-28d487a1d36538a3c5acdac40b7833f3fb365f95.tar.gz
Skip IPMI probing on laptops. IPMI is almost exclusively implemented on
servers, I've never seen it on a laptop and I don't really expect this to ever happen. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5523 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r--CHANGES1
-rwxr-xr-xprog/detect/sensors-detect30
2 files changed, 21 insertions, 10 deletions
diff --git a/CHANGES b/CHANGES
index 785c704b..048f7c05 100644
--- a/CHANGES
+++ b/CHANGES
@@ -43,6 +43,7 @@ SVN-HEAD
Gather DMI data and print it at start-up
Always probe the SMBus on Asus and Tyan boards
Move IPMI interface detection to its own section
+ Skip IPMI probing on laptops
sensors-detect-stat.pl: Delete (functionality merged into sensors-detect)
3.0.3 (2008-09-28)
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
index ead9a969..99cb8635 100755
--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -2214,6 +2214,14 @@ sub dmi_match
return 0;
}
+sub is_laptop
+{
+ return 0 unless $dmi{chassis_type};
+ return 1 if $dmi{chassis_type} =~ m/(Laptop|Notebook|Hand Held)/i;
+ return 1 if $dmi{chassis_type} =~ m/^(9|10|11|14)$/;
+ return 0;
+}
+
#################
# SYSFS HELPERS #
#################
@@ -5174,17 +5182,19 @@ sub main
}
print "\n";
- print "Some systems (mainly servers) implement IPMI, a set of common interfaces\n".
- "through which system health data may be retrieved, amongst other things.\n".
- "We have to read from arbitrary I/O ports to probe for such interfaces.\n".
- "This is normally safe. Do you want to scan for IPMI interfaces?\n".
- "(YES/no): ";
- unless (<STDIN> =~ /^\s*n/i) {
- initialize_ioports();
- scan_isa_bus(\@ipmi_ifs);
- close_ioports();
+ unless (is_laptop()) {
+ print "Some systems (mainly servers) implement IPMI, a set of common interfaces\n".
+ "through which system health data may be retrieved, amongst other things.\n".
+ "We have to read from arbitrary I/O ports to probe for such interfaces.\n".
+ "This is normally safe. Do you want to scan for IPMI interfaces?\n".
+ "(YES/no): ";
+ unless (<STDIN> =~ /^\s*n/i) {
+ initialize_ioports();
+ scan_isa_bus(\@ipmi_ifs);
+ close_ioports();
+ }
+ print "\n";
}
- print "\n";
printf "Some hardware monitoring chips are accessible through the ISA I/O ports.\n".
"We have to write to arbitrary I/O ports to probe them. This is usually\n".