From 28d487a1d36538a3c5acdac40b7833f3fb365f95 Mon Sep 17 00:00:00 2001 From: khali Date: Fri, 5 Dec 2008 10:00:32 +0000 Subject: 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 --- CHANGES | 1 + prog/detect/sensors-detect | 30 ++++++++++++++++++++---------- 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 ( =~ /^\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 ( =~ /^\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". -- cgit v1.2.1