Hello community,
here is the log from the commit of package sensors for openSUSE:Factory checked in at 2012-03-29 11:42:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sensors (Old)
and /work/SRC/openSUSE:Factory/.sensors.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sensors", Maintainer is "JDelvare@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/sensors/sensors.changes 2012-03-19 10:04:19.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.sensors.new/sensors.changes 2012-03-29 11:42:42.000000000 +0200
@@ -1,0 +2,18 @@
+Tue Mar 20 18:08:30 CET 2012 - jdelvare@suse.de
+
+- Update to lm_sensors 3.3.2
+ * Support for many subfeatures implemented by new hwmon drivers.
+ * Fix to support a sysfs implementation change in upcoming kernels.
+ * Better printing of power sensors in sensors.
+ * Memory leaks fixed in sensord.
+ * New chips known by sensors-detect, as usual.
+- lm_sensors-r5991-improve-filtering-of-fake-DMI-data.patch,
+ lm_sensors-r5992-print-DMI-product-version.patch,
+ lm_sensors-r5993-fix-loading-of-cpuid-module.patch,
+ lm_sensors-r6016-handle-superio-wo-logdev.patch,
+ lm_sensors-r6017-fix-sysfs-detection.patch,
+ lm_sensors-r6025-sensord-fix-memory-leaks.patch,
+ lm_sensors-r6030-fix-power-interval-output.patch: Removes,
+ obsolete.
+
+-------------------------------------------------------------------
Old:
----
lm_sensors-3.3.1.tar.bz2
lm_sensors-r5991-improve-filtering-of-fake-DMI-data.patch
lm_sensors-r5992-print-DMI-product-version.patch
lm_sensors-r5993-fix-loading-of-cpuid-module.patch
lm_sensors-r6016-handle-superio-wo-logdev.patch
lm_sensors-r6017-fix-sysfs-detection.patch
lm_sensors-r6025-sensord-fix-memory-leaks.patch
lm_sensors-r6030-fix-power-interval-output.patch
New:
----
lm_sensors-3.3.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sensors.spec ++++++
--- /var/tmp/diff_new_pack.IK0K1Q/_old 2012-03-29 11:42:43.000000000 +0200
+++ /var/tmp/diff_new_pack.IK0K1Q/_new 2012-03-29 11:42:43.000000000 +0200
@@ -21,7 +21,7 @@
Name: sensors
BuildRequires: bison flex rrdtool-devel
Url: http://www.lm-sensors.org/
-Version: 3.3.1
+Version: 3.3.2
Release: 1
Summary: Hardware health monitoring for Linux
License: GPL-2.0+
@@ -35,13 +35,6 @@
Patch2: lm_sensors-3.0.0-sensord-separate.patch
Patch3: lm_sensors-3.0.0-sysconfig_metadata.patch
Patch4: lm_sensors-3.0.3-hint-at-kernel-extra-package.patch
-Patch5: lm_sensors-r5991-improve-filtering-of-fake-DMI-data.patch
-Patch6: lm_sensors-r5992-print-DMI-product-version.patch
-Patch7: lm_sensors-r5993-fix-loading-of-cpuid-module.patch
-Patch8: lm_sensors-r6016-handle-superio-wo-logdev.patch
-Patch9: lm_sensors-r6017-fix-sysfs-detection.patch
-Patch10: lm_sensors-r6025-sensord-fix-memory-leaks.patch
-Patch11: lm_sensors-r6030-fix-power-interval-output.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: s390 s390x
@@ -144,13 +137,6 @@
%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
++++++ lm_sensors-3.0.0-sysconfig_metadata.patch ++++++
--- /var/tmp/diff_new_pack.IK0K1Q/_old 2012-03-29 11:42:43.000000000 +0200
+++ /var/tmp/diff_new_pack.IK0K1Q/_new 2012-03-29 11:42:43.000000000 +0200
@@ -2,9 +2,9 @@
prog/detect/sensors-detect | 6 ++++++
1 file changed, 6 insertions(+)
---- lm_sensors-3.3.0.orig/prog/detect/sensors-detect
-+++ lm_sensors-3.3.0/prog/detect/sensors-detect
-@@ -6416,6 +6416,12 @@ sub write_config
+--- lm_sensors-3.3.2.orig/prog/detect/sensors-detect
++++ lm_sensors-3.3.2/prog/detect/sensors-detect
+@@ -6642,6 +6642,12 @@ sub write_config
or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)";
print SYSCONFIG "# Generated by sensors-detect on " . scalar localtime() . "\n";
print SYSCONFIG <<'EOT';
++++++ lm_sensors-3.0.3-hint-at-kernel-extra-package.patch ++++++
--- /var/tmp/diff_new_pack.IK0K1Q/_old 2012-03-29 11:42:43.000000000 +0200
+++ /var/tmp/diff_new_pack.IK0K1Q/_new 2012-03-29 11:42:43.000000000 +0200
@@ -6,9 +6,9 @@
prog/detect/sensors-detect | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---- lm_sensors-3.3.0.orig/prog/detect/sensors-detect
-+++ lm_sensors-3.3.0/prog/detect/sensors-detect
-@@ -2421,12 +2421,15 @@ sub initialize_conf
+--- lm_sensors-3.3.2.orig/prog/detect/sensors-detect
++++ lm_sensors-3.3.2/prog/detect/sensors-detect
+@@ -2567,12 +2567,15 @@ sub initialize_conf
# [2] -> SUBLEVEL
# [3] -> EXTRAVERSION
#
@@ -25,7 +25,7 @@
chomp($kernel_arch = `uname -m`);
# We only support kernels >= 2.6.5
-@@ -6358,7 +6361,11 @@ sub generate_modprobes
+@@ -6584,7 +6587,11 @@ sub generate_modprobes
# isn't supported
if ((($? >> 8) == 0) && ! $modulefound) {
print "Warning: the required module $driver is not currently installed\n".
++++++ lm_sensors-3.3.1.tar.bz2 -> lm_sensors-3.3.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/CHANGES new/lm_sensors-3.3.2/CHANGES
--- old/lm_sensors-3.3.1/CHANGES 2011-07-21 22:36:42.000000000 +0200
+++ new/lm_sensors-3.3.2/CHANGES 2012-03-14 08:43:39.000000000 +0100
@@ -1,6 +1,35 @@
lm-sensors CHANGES file
-----------------------
+3.3.2 (2012-03-14)
+ libsensors: Added support for new sysfs attributes
+ Change sysfs detection to survive upcoming kernel changes
+ sensord: Fix memory leaks revealed by valgrind
+ Minor performance improvements
+ sensors: Added support for new sysfs attributes
+ Display both instantaneous and average power if available.
+ Report thermal sensor type 1 as CPU diode
+ Align power values better
+ Fix power interval output
+ fancontrol: Support setup where one PWM output controls several fans
+ Output error messages to stderr
+ 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
+ Make LM73 detection less problematic
+ Add detection of National Semiconductor LM96163
+ Add detection of GMT G781
+ Properly handle Super-I/O chips without logical device
+ Add detection of National Semiconductor LM96080
+ Add detection of ITE IT8771E
+ Add detection of ITE IT8781F, IT8782F and IT8783F
+ Add detection of ITE IT8510E/TE/G, IT8511E/TE/G,
+ IT8513E/F/G, and IT8518E
+ Add detection of ST Microelectronics STTS2002 and STTS3000
+ Add detection of IDT TSE2002GB2, TS3000GB2, Microchip MCP9804,
+ and Atmel AT30TS00
+
3.3.1 (2011-07-21)
isadump: Add support for word (16-bit) and long (32-bit) reads
isaset: Add support for word (16-bit) and long (32-bit) writes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/doc/developers/lm_sensors.lsm new/lm_sensors-3.3.2/doc/developers/lm_sensors.lsm
--- old/lm_sensors-3.3.1/doc/developers/lm_sensors.lsm 2011-07-21 22:36:42.000000000 +0200
+++ new/lm_sensors-3.3.2/doc/developers/lm_sensors.lsm 2012-03-14 08:43:39.000000000 +0100
@@ -1,7 +1,7 @@
Begin4
Title: lm_sensors
-Version: 3.3.1
-Entered-date: 2011-07-21
+Version: 3.3.2
+Entered-date: 2012-03-14
Description: Hardware health monitoring package for Linux. It consists of
a library to allow applications to read sensors data more
easily, and of an example program to pretty print this data.
@@ -11,8 +11,8 @@
Author: khali@linux-fr.org (Jean Delvare)
Maintained-by: khali@linux-fr.org (Jean Delvare)
Primary-site: http://dl.lm-sensors.org /lm-sensors/releases/
- lm_sensors-3.3.1.tar.bz2
- lm_sensors-3.3.1.tar.bz2.sig
+ lm_sensors-3.3.2.tar.bz2
+ lm_sensors-3.3.2.tar.bz2.sig
Alternate-site: ftp.netroedge.com /pub/lm-sensors/
Copying-policy: GPL/LGPL
End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/doc/donations new/lm_sensors-3.3.2/doc/donations
--- old/lm_sensors-3.3.1/doc/donations 2011-02-05 18:59:28.000000000 +0100
+++ new/lm_sensors-3.3.2/doc/donations 2012-03-13 20:30:30.000000000 +0100
@@ -96,6 +96,10 @@
ASUSTeK ASUS P5MT-S 2006-03
Platform for W83792D related development Rudolf Marek
+Winbond Asus P4P800-VM 2006-08
+ This board has a Winbond W83627THF hardware Jean Delvare
+ monitoring chip.
+
Winbond Asus P4P800-X, Pentium 4 2.8 GHz, 512 MB RAM 2006-08
This board has an (hidden) Intel 82801EB Jean Delvare
(ICH5) SMBus with SPD EEPROMs connected, and
@@ -124,3 +128,6 @@
and power supply. Guenter Roeck
Used to add support for NCT6775F (W83677HG-I)
to w83627ehf driver.
+
+AMD Asus EAH6450 Silent video card 2011-12
+ Jean Delvare
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/doc/libsensors-API.txt new/lm_sensors-3.3.2/doc/libsensors-API.txt
--- old/lm_sensors-3.3.1/doc/libsensors-API.txt 2011-07-21 22:36:42.000000000 +0200
+++ new/lm_sensors-3.3.2/doc/libsensors-API.txt 2012-03-14 08:43:39.000000000 +0100
@@ -6,6 +6,19 @@
authors can quickly figure out how to test for the availability of a
given new feature.
+0x432
+* Added support for new sysfs attributes
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_IN_AVERAGE
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_IN_LOWEST
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_IN_HIGHEST
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_TEMP_LOWEST
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_TEMP_HIGHEST
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_CURR_AVERAGE
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_CURR_LOWEST
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_CURR_HIGHEST
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_FAN_MAX
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_FAN_MIN_ALARM
+ enum sensors_subfeature_type SENSORS_SUBFEATURE_FAN_MAX_ALARM
0x431 lm-sensors 3.3.0 to 3.3.1
* Added support for intrusion detection
enum sensors_feature_type SENSORS_FEATURE_INTRUSION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/etc/sensors.conf.default new/lm_sensors-3.3.2/etc/sensors.conf.default
--- old/lm_sensors-3.3.1/etc/sensors.conf.default 2011-05-28 11:56:27.000000000 +0200
+++ new/lm_sensors-3.3.2/etc/sensors.conf.default 2012-01-31 15:25:29.000000000 +0100
@@ -12,7 +12,7 @@
# Such custom configuration files for specific mainboards can be found at
# http://www.lm-sensors.org/wiki/Configurations
-chip "lm78-*" "lm79-*" "lm80-*"
+chip "lm78-*" "lm79-*" "lm80-*" "lm96080-*"
label temp1 "M/B Temp"
@@ -323,7 +323,7 @@
set in7_min 3.3 * 0.90
set in7_max 3.3 * 1.10
set in8_min 3.0 * 0.90
- set in8_max 3.0 * 1.10
+ set in8_max 3.3 * 1.10
chip "w83627uhg-*"
@@ -340,7 +340,7 @@
set in7_min 5.0 * 0.90
set in7_max 5.0 * 1.10
set in8_min 3.0 * 0.90
- set in8_max 3.0 * 1.10
+ set in8_max 3.3 * 1.10
chip "f71805f-*"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/lib/Module.mk new/lm_sensors-3.3.2/lib/Module.mk
--- old/lm_sensors-3.3.1/lib/Module.mk 2011-03-06 21:20:55.000000000 +0100
+++ new/lm_sensors-3.3.2/lib/Module.mk 2012-03-14 08:43:39.000000000 +0100
@@ -33,7 +33,7 @@
# changed in a backward incompatible way. The interface is defined by
# the public header files - in this case they are error.h and sensors.h.
LIBMAINVER := 4
-LIBMINORVER := 3.1
+LIBMINORVER := 3.2
LIBVER := $(LIBMAINVER).$(LIBMINORVER)
# The static lib name, the shared lib name, and the internal ('so') name of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/lib/sensors.h new/lm_sensors-3.3.2/lib/sensors.h
--- old/lm_sensors-3.3.1/lib/sensors.h 2011-03-28 09:02:37.000000000 +0200
+++ new/lm_sensors-3.3.2/lib/sensors.h 2012-03-14 08:43:39.000000000 +0100
@@ -31,7 +31,7 @@
when the API + ABI breaks), the third digit is incremented to track small
API additions like new flags / enum values. The second digit is for tracking
larger additions like new methods. */
-#define SENSORS_API_VERSION 0x431
+#define SENSORS_API_VERSION 0x432
#define SENSORS_CHIP_NAME_PREFIX_ANY NULL
#define SENSORS_CHIP_NAME_ADDR_ANY (-1)
@@ -157,6 +157,9 @@
SENSORS_SUBFEATURE_IN_MAX,
SENSORS_SUBFEATURE_IN_LCRIT,
SENSORS_SUBFEATURE_IN_CRIT,
+ SENSORS_SUBFEATURE_IN_AVERAGE,
+ SENSORS_SUBFEATURE_IN_LOWEST,
+ SENSORS_SUBFEATURE_IN_HIGHEST,
SENSORS_SUBFEATURE_IN_ALARM = (SENSORS_FEATURE_IN << 8) | 0x80,
SENSORS_SUBFEATURE_IN_MIN_ALARM,
SENSORS_SUBFEATURE_IN_MAX_ALARM,
@@ -166,11 +169,14 @@
SENSORS_SUBFEATURE_FAN_INPUT = SENSORS_FEATURE_FAN << 8,
SENSORS_SUBFEATURE_FAN_MIN,
+ SENSORS_SUBFEATURE_FAN_MAX,
SENSORS_SUBFEATURE_FAN_ALARM = (SENSORS_FEATURE_FAN << 8) | 0x80,
SENSORS_SUBFEATURE_FAN_FAULT,
SENSORS_SUBFEATURE_FAN_DIV,
SENSORS_SUBFEATURE_FAN_BEEP,
SENSORS_SUBFEATURE_FAN_PULSES,
+ SENSORS_SUBFEATURE_FAN_MIN_ALARM,
+ SENSORS_SUBFEATURE_FAN_MAX_ALARM,
SENSORS_SUBFEATURE_TEMP_INPUT = SENSORS_FEATURE_TEMP << 8,
SENSORS_SUBFEATURE_TEMP_MAX,
@@ -181,6 +187,8 @@
SENSORS_SUBFEATURE_TEMP_LCRIT,
SENSORS_SUBFEATURE_TEMP_EMERGENCY,
SENSORS_SUBFEATURE_TEMP_EMERGENCY_HYST,
+ SENSORS_SUBFEATURE_TEMP_LOWEST,
+ SENSORS_SUBFEATURE_TEMP_HIGHEST,
SENSORS_SUBFEATURE_TEMP_ALARM = (SENSORS_FEATURE_TEMP << 8) | 0x80,
SENSORS_SUBFEATURE_TEMP_MAX_ALARM,
SENSORS_SUBFEATURE_TEMP_MIN_ALARM,
@@ -215,6 +223,9 @@
SENSORS_SUBFEATURE_CURR_MAX,
SENSORS_SUBFEATURE_CURR_LCRIT,
SENSORS_SUBFEATURE_CURR_CRIT,
+ SENSORS_SUBFEATURE_CURR_AVERAGE,
+ SENSORS_SUBFEATURE_CURR_LOWEST,
+ SENSORS_SUBFEATURE_CURR_HIGHEST,
SENSORS_SUBFEATURE_CURR_ALARM = (SENSORS_FEATURE_CURR << 8) | 0x80,
SENSORS_SUBFEATURE_CURR_MIN_ALARM,
SENSORS_SUBFEATURE_CURR_MAX_ALARM,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/lib/sysfs.c new/lm_sensors-3.3.2/lib/sysfs.c
--- old/lm_sensors-3.3.1/lib/sysfs.c 2011-03-04 21:37:43.000000000 +0100
+++ new/lm_sensors-3.3.2/lib/sysfs.c 2012-03-06 08:34:13.000000000 +0100
@@ -24,6 +24,7 @@
#include
#include
+#include
#include
#include
#include
@@ -40,6 +41,7 @@
/****************************************************************************/
#define ATTR_MAX 128
+#define SYSFS_MAGIC 0x62656572
/*
* Read an attribute from sysfs
@@ -233,6 +235,8 @@
{ "lcrit", SENSORS_SUBFEATURE_TEMP_LCRIT },
{ "emergency", SENSORS_SUBFEATURE_TEMP_EMERGENCY },
{ "emergency_hyst", SENSORS_SUBFEATURE_TEMP_EMERGENCY_HYST },
+ { "lowest", SENSORS_SUBFEATURE_TEMP_LOWEST },
+ { "highest", SENSORS_SUBFEATURE_TEMP_HIGHEST },
{ "alarm", SENSORS_SUBFEATURE_TEMP_ALARM },
{ "min_alarm", SENSORS_SUBFEATURE_TEMP_MIN_ALARM },
{ "max_alarm", SENSORS_SUBFEATURE_TEMP_MAX_ALARM },
@@ -252,6 +256,9 @@
{ "max", SENSORS_SUBFEATURE_IN_MAX },
{ "lcrit", SENSORS_SUBFEATURE_IN_LCRIT },
{ "crit", SENSORS_SUBFEATURE_IN_CRIT },
+ { "average", SENSORS_SUBFEATURE_IN_AVERAGE },
+ { "lowest", SENSORS_SUBFEATURE_IN_LOWEST },
+ { "highest", SENSORS_SUBFEATURE_IN_HIGHEST },
{ "alarm", SENSORS_SUBFEATURE_IN_ALARM },
{ "min_alarm", SENSORS_SUBFEATURE_IN_MIN_ALARM },
{ "max_alarm", SENSORS_SUBFEATURE_IN_MAX_ALARM },
@@ -264,9 +271,12 @@
static const struct subfeature_type_match fan_matches[] = {
{ "input", SENSORS_SUBFEATURE_FAN_INPUT },
{ "min", SENSORS_SUBFEATURE_FAN_MIN },
+ { "max", SENSORS_SUBFEATURE_FAN_MAX },
{ "div", SENSORS_SUBFEATURE_FAN_DIV },
{ "pulses", SENSORS_SUBFEATURE_FAN_PULSES },
{ "alarm", SENSORS_SUBFEATURE_FAN_ALARM },
+ { "min_alarm", SENSORS_SUBFEATURE_FAN_MIN_ALARM },
+ { "max_alarm", SENSORS_SUBFEATURE_FAN_MAX_ALARM },
{ "fault", SENSORS_SUBFEATURE_FAN_FAULT },
{ "beep", SENSORS_SUBFEATURE_FAN_BEEP },
{ NULL, 0 }
@@ -302,6 +312,9 @@
{ "max", SENSORS_SUBFEATURE_CURR_MAX },
{ "lcrit", SENSORS_SUBFEATURE_CURR_LCRIT },
{ "crit", SENSORS_SUBFEATURE_CURR_CRIT },
+ { "average", SENSORS_SUBFEATURE_CURR_AVERAGE },
+ { "lowest", SENSORS_SUBFEATURE_CURR_LOWEST },
+ { "highest", SENSORS_SUBFEATURE_CURR_HIGHEST },
{ "alarm", SENSORS_SUBFEATURE_CURR_ALARM },
{ "min_alarm", SENSORS_SUBFEATURE_CURR_MIN_ALARM },
{ "max_alarm", SENSORS_SUBFEATURE_CURR_MAX_ALARM },
@@ -585,11 +598,11 @@
/* returns !0 if sysfs filesystem was found, 0 otherwise */
int sensors_init_sysfs(void)
{
- struct stat statbuf;
+ struct statfs statfsbuf;
snprintf(sensors_sysfs_mount, NAME_MAX, "%s", "/sys");
- if (stat(sensors_sysfs_mount, &statbuf) < 0
- || statbuf.st_nlink <= 2) /* Empty directory */
+ if (statfs(sensors_sysfs_mount, &statfsbuf) < 0
+ || statfsbuf.f_type != SYSFS_MAGIC)
return 0;
return 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/prog/detect/sensors-detect new/lm_sensors-3.3.2/prog/detect/sensors-detect
--- old/lm_sensors-3.3.1/prog/detect/sensors-detect 2011-07-10 21:22:53.000000000 +0200
+++ new/lm_sensors-3.3.2/prog/detect/sensors-detect 2012-03-07 17:14:01.000000000 +0100
@@ -41,7 +41,7 @@
use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
$i2c_addresses_to_scan $revision @i2c_byte_cache);
-$revision = '$Revision: 5984 $ ($Date: 2011-07-10 21:22:53 +0200 (dim. 10 juil. 2011) $)';
+$revision = '$Revision: 6031 $ ($Date: 2012-03-07 17:14:01 +0100 (mer. 07 mars 2012) $)';
$revision =~ s/\$\w+: (.*?) \$/$1/g;
$revision =~ s/ \([^()]*\)//;
@@ -60,7 +60,7 @@
vendid => 0x8086,
devid => 0x7603,
procid => "Intel 82372FB PIIX5 ACPI",
- driver => "to-be-tested",
+ driver => "to-be-written",
}, {
vendid => 0x8086,
devid => 0x719b,
@@ -153,6 +153,26 @@
driver => "i2c-i801",
}, {
vendid => 0x8086,
+ devid => 0x1D22,
+ procid => "Intel Patsburg (PCH)",
+ driver => "i2c-i801",
+ }, {
+ vendid => 0x8086,
+ devid => 0x2330,
+ procid => "Intel DH89xxCC (PCH)",
+ driver => "i2c-i801",
+ }, {
+ vendid => 0x8086,
+ devid => 0x1E22,
+ procid => "Intel Panther Point (PCH)",
+ driver => "i2c-i801",
+ }, {
+ vendid => 0x8086,
+ devid => 0x8C22,
+ procid => "Intel Lynx Point (PCH)",
+ driver => "i2c-i801",
+ }, {
+ vendid => 0x8086,
devid => 0x8119,
procid => "Intel SCH",
driver => "i2c-isch",
@@ -520,7 +540,12 @@
name => "National Semiconductor LM80",
driver => "lm80",
i2c_addrs => [0x28..0x2f],
- i2c_detect => sub { lm80_detect(@_); },
+ i2c_detect => sub { lm80_detect(@_, 0); },
+ }, {
+ name => "National Semiconductor LM96080",
+ driver => "lm80",
+ i2c_addrs => [0x28..0x2f],
+ i2c_detect => sub { lm80_detect(@_, 1); },
}, {
name => "National Semiconductor LM85",
driver => "lm85",
@@ -657,7 +682,7 @@
i2c_addrs => [0x2c..0x2e],
i2c_detect => sub { lm93_detect(@_, 0); },
}, {
- name => "National Semiconductor LM94",
+ name => "National Semiconductor LM94 or LM96194",
driver => "lm93",
i2c_addrs => [0x2c..0x2e],
i2c_detect => sub { lm93_detect(@_, 1); },
@@ -818,6 +843,11 @@
i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
i2c_detect => sub { adm1021_detect(@_, 1); },
}, {
+ name => "Global Mixed-mode Technology G781",
+ driver => "lm90",
+ i2c_addrs => [0x4c, 0x4d],
+ i2c_detect => sub { lm90_detect(@_, 15); },
+ }, {
name => "Maxim MAX1617",
driver => "adm1021",
i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
@@ -1023,6 +1053,11 @@
i2c_addrs => [0x18, 0x4e],
i2c_detect => sub { lm63_detect(@_, 3); },
}, {
+ name => "National Semiconductor LM96163",
+ driver => "lm63",
+ i2c_addrs => [0x4c],
+ i2c_detect => sub { lm63_detect(@_, 4); },
+ }, {
name => "Fintek F75363SG",
driver => "lm63", # Not yet
i2c_addrs => [0x4c],
@@ -1315,6 +1350,16 @@
i2c_addrs => [0x18..0x1f],
i2c_detect => sub { jedec_JC42_4_detect(@_, 10); },
}, {
+ name => "ST STTS2002",
+ driver => "jc42",
+ i2c_addrs => [0x18..0x1f],
+ i2c_detect => sub { jedec_JC42_4_detect(@_, 11); },
+ }, {
+ name => "ST STTS3000",
+ driver => "jc42",
+ i2c_addrs => [0x18..0x1f],
+ i2c_detect => sub { jedec_JC42_4_detect(@_, 12); },
+ }, {
name => "NXP SE97/SE97B",
driver => "jc42",
i2c_addrs => [0x18..0x1f],
@@ -1340,6 +1385,11 @@
i2c_addrs => [0x18..0x1f],
i2c_detect => sub { jedec_JC42_4_detect(@_, 5); },
}, {
+ name => "Microchip MCP9804",
+ driver => "jc42",
+ i2c_addrs => [0x18..0x1f],
+ i2c_detect => sub { jedec_JC42_4_detect(@_, 13); },
+ }, {
name => "Microchip MCP98242",
driver => "jc42",
i2c_addrs => [0x18..0x1f],
@@ -1359,6 +1409,11 @@
driver => "jc42",
i2c_addrs => [0x18..0x1f],
i2c_detect => sub { jedec_JC42_4_detect(@_, 9); },
+ }, {
+ name => "Atmel AT30TS00",
+ driver => "jc42",
+ i2c_addrs => [0x18..0x1f],
+ i2c_detect => sub { jedec_JC42_4_detect(@_, 14); },
}
);
@@ -1560,15 +1615,35 @@
logdev => 0x14,
features => FEAT_IN | FEAT_TEMP,
}, {
+ name => "ITE IT8510E/TE/G Super IO",
+ driver => "to-be-written",
+ devid => 0x8510,
+ features => FEAT_IN | FEAT_FAN,
+ }, {
+ name => "ITE IT8511E/TE/G Super IO",
+ driver => "to-be-written",
+ devid => 0x8511,
+ features => FEAT_IN | FEAT_FAN,
+ }, {
name => "ITE IT8512E/F/G Super IO",
driver => "to-be-written",
devid => 0x8512,
features => FEAT_IN | FEAT_FAN,
}, {
+ name => "ITE IT8513E/F/G Super IO",
+ driver => "to-be-written",
+ devid => 0x8513,
+ features => FEAT_IN | FEAT_FAN,
+ }, {
name => "ITE IT8516E/F/G Super IO",
driver => "to-be-written",
devid => 0x8516,
features => FEAT_IN | FEAT_FAN,
+ }, {
+ name => "ITE IT8518E Super IO",
+ driver => "to-be-written",
+ devid => 0x8518,
+ features => FEAT_IN | FEAT_FAN,
}
);
@@ -1908,7 +1983,7 @@
logdev => 0x0b,
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}, {
- name => "Winbond W83627DHG-P Super IO Sensors",
+ name => "Winbond W83627DHG-P/W83527HG Super IO Sensors",
driver => "w83627ehf",
devid => 0xB070,
devid_mask => 0xFFF0,
@@ -2120,16 +2195,40 @@
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}, {
name => "ITE IT8728F Super IO Sensors",
- driver => "to-be-written", # it87
+ driver => "it87",
devid => 0x8728,
logdev => 0x04,
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}, {
+ name => "ITE IT8771E Super IO Sensors",
+ driver => "to-be-written", # it87
+ devid => 0x8771,
+ logdev => 0x04,
+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+ }, {
name => "ITE IT8772E Super IO Sensors",
driver => "to-be-written", # it87
devid => 0x8772,
logdev => 0x04,
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+ }, {
+ name => "ITE IT8781F Super IO Sensors",
+ driver => "to-be-written", # it87
+ devid => 0x8781,
+ logdev => 0x04,
+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+ }, {
+ name => "ITE IT8782F Super IO Sensors",
+ driver => "to-be-written", # it87
+ devid => 0x8782,
+ logdev => 0x04,
+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+ }, {
+ name => "ITE IT8783F Super IO Sensors",
+ driver => "to-be-written", # it87
+ devid => 0x8783,
+ logdev => 0x04,
+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}
);
@@ -2764,8 +2863,11 @@
);
# Many BIOS have broken DMI data, filter it out
my %fake = (
- 'System Manufacturer' => 1,
- 'System Name' => 1,
+ 'system manufacturer' => 1,
+ 'system product name' => 1,
+ 'system name' => 1,
+ 'system version' => 1,
+ 'to be filled by o.e.m.' => 1,
);
my $dmi_id_dir;
@@ -2794,7 +2896,7 @@
next;
}
$dmi{$k} =~ s/\s*$//;
- delete $dmi{$k} if $dmi{$k} eq '' || exists $fake{$dmi{$k}};
+ delete $dmi{$k} if $dmi{$k} eq '' || exists $fake{lc($dmi{$k})};
}
}
@@ -2810,6 +2912,7 @@
if (defined $system) {
print "# System: $system";
+ print " [$dmi{product_version}]" if defined $dmi{product_version};
print " (laptop)" if (is_laptop());
print "\n";
}
@@ -2970,16 +3073,8 @@
next unless exists $pci_list{$key};
$device = $pci_list{$key};
- if ($try->{driver} eq "to-be-tested") {
- print "\nWe are currently looking for testers for this adapter!\n".
- "Please check http://www.lm-sensors.org/wiki/Devices\n".
- "and/or contact us if you want to help.\n\n".
- "Continue... ";
- <STDIN>;
- print "\n";
- }
- if ($try->{driver} =~ m/^to-be-/) {
+ if ($try->{driver} eq "to-be-written") {
printf "No known driver for device \%s: \%s\n",
pci_busid($device), $try->{procid};
} else {
@@ -3741,6 +3836,10 @@
print "\n (hardware monitoring capabilities accessible via SMBus only)\n";
return FEAT_SMBUS;
}
+ if (!exists $chip->{logdev}) {
+ print "\n (no support yet)\n";
+ return 0;
+ }
# Switch to the sensor logical device
outb($addrreg, $superio{logdevreg});
@@ -4049,7 +4148,9 @@
# Bits that always return 0
return if ($conf & 0x0c) or ($status & 0x10);
- return if i2c_smbus_read_word_data($file, 0x07) != 0x9001;
+ # Test with byte read first to avoid confusing other chips
+ return if i2c_smbus_read_byte_data($file, 0x07) != 0x01
+ or i2c_smbus_read_word_data($file, 0x07) != 0x9001;
# Make sure the chip supports SMBus read word transactions
my $cur = i2c_smbus_read_word_data($file, 0x00);
@@ -4228,11 +4329,15 @@
return ($slope == 0x10 && $counter <= $slope) ? 3 : 2;
}
+# Chip to detect: 0 = LM80, 1 = LM96080
# Registers used:
# 0x00: Configuration register
# 0x02: Interrupt state register
-# 0x2a-0x3d: Limits registers
-# This one is easily misdetected since it doesn't provide identification
+# 0x07: Converstion rate register (LM96080 only)
+# 0x2a-0x3d: Limits registers (LM80 only)
+# 0x3e: Manufacturer's ID register (LM96080 only)
+# 0x3f: Stepping/die revision ID register (LM96080 only)
+# The LM80 is easily misdetected since it doesn't provide identification
# registers. So we have to use some tricks:
# - 6-bit addressing, so limits readings modulo 0x40 should be unchanged
# - positive temperature limits
@@ -4245,44 +4350,51 @@
# to loose comparisons did not change the score.
sub lm80_detect
{
- my ($file, $addr) = @_;
+ my ($file, $addr, $chip) = @_;
my ($i, $reg);
return if (i2c_smbus_read_byte_data($file, 0x00) & 0x80) != 0;
return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
- for ($i = 0x2a; $i <= 0x3d; $i++) {
- $reg = i2c_smbus_read_byte_data($file, $i);
- return if i2c_smbus_read_byte_data($file, $i+0x40) != $reg;
- return if i2c_smbus_read_byte_data($file, $i+0x80) != $reg;
- return if i2c_smbus_read_byte_data($file, $i+0xc0) != $reg;
- }
-
- # Refine a bit by checking whether limits are in the correct order
- # (min> 1) - 4;
- # $confidence is now between -4 and 3
+ # $confidence is between 0 and 14
+ $confidence = ($confidence >> 1) - 4;
+ # $confidence is now between -4 and 3
- return unless $confidence > 0;
+ return unless $confidence > 0;
+ return $confidence;
+ } elsif ($chip == 1) {
+ return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
+ return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
+ return if i2c_smbus_read_byte_data($file, 0x3f) != 0x08;
- return $confidence;
+ return 6;
+ }
}
# Registers used:
@@ -4362,7 +4474,8 @@
# 6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
# 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
# 11 = W83L771AWG/ASG, 12 = MAX6690,
-# 13 = ADT7461A/NCT1008, 14 = SA56004
+# 13 = ADT7461A/NCT1008, 14 = SA56004,
+# 15 = G781
# Registers used:
# 0x03: Configuration
# 0x04: Conversion rate
@@ -4474,6 +4587,12 @@
return if $mid != 0xa1; # NXP Semiconductor/Philips
return 6 if $cid == 0x00; # SA56004
}
+ if ($chip == 15) {
+ return if ($conf & 0x3f) != 0;
+ return if $rate > 0x08;
+ return if $mid != 0x47; # GMT
+ return 8 if $cid == 0x01; # G781
+ }
return;
}
@@ -4602,7 +4721,7 @@
return 6;
}
-# Chip to detect: 1 = LM63, 2 = F75363SG, 3 = LM64
+# Chip to detect: 1 = LM63, 2 = F75363SG, 3 = LM64, 4 = LM96163
# Registers used:
# 0xfe: Manufacturer ID
# 0xff: Chip ID / die revision
@@ -4632,6 +4751,11 @@
|| $cid != 0x51; # LM64
return if ($conf & 0x18) != 0x00
|| ($mask & 0xa4) != 0xa4;
+ } elsif ($chip == 4) {
+ return if $mid != 0x01 # National Semiconductor
+ || $cid != 0x49; # LM96163
+ return if ($conf & 0x18) != 0x00
+ || ($mask & 0xa4) != 0xa4;
}
return 6;
@@ -5881,7 +6005,8 @@
# Chip to detect: 0 = STTS424, 1 = SE97/SE97B, 2 = SE98, 3 = ADT7408,
# 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
# 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
-# 10 = STTS424E
+# 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
+# 13 = MCP9804, 14 = AT30TS00
# Registers used:
# 0x00: Capabilities
# 0x01: Configuration
@@ -5938,6 +6063,18 @@
} elsif ($chip == 10) {
return unless $manid == 0x10; # STMicrolectronics
return unless $devid == 0x00; # STTS424E02
+ } elsif ($chip == 11) {
+ return unless $manid == 0x10; # STMicrolectronics
+ return unless $devid == 0x03; # STTS2002
+ } elsif ($chip == 12) {
+ return unless $manid == 0x10; # STMicrolectronics
+ return unless $devid == 0x02; # STTS3000
+ } elsif ($chip == 13) {
+ return unless $manid == 0x00; # MCP
+ return unless $devid == 02; # MCP9804
+ } elsif ($chip == 14) {
+ return unless $manid == 0x00; # Atmel
+ return unless $devid == 0x82; # AT30TS00
}
# Now, do it all again with words. Note that we get
@@ -5964,7 +6101,7 @@
return unless $devid == 0x0108; # ADT7408
} elsif ($chip == 4) {
return unless $manid == 0xb300; # IDT
- return unless $devid == 0x0329; # TS3000/TSE2002
+ return unless $devid == 0x0329 || $devid == 0x1229; # TS3000/TSE2002
} elsif ($chip == 5) {
return unless $manid == 0x4d00; # MAXIM
return unless $devid == 0x003e; # MAX6604
@@ -5983,6 +6120,18 @@
} elsif ($chip == 10) {
return unless $manid == 0x4a10; # STMicrolectronics
return unless ($devid & 0xfeff) == 0x0000; # STTS424E02
+ } elsif ($chip == 11) {
+ return unless $manid == 0x4a10; # STMicrolectronics
+ return unless ($devid & 0xfeff) == 0x0003; # STTS2002
+ } elsif ($chip == 12) {
+ return unless $manid == 0x4a10; # STMicrolectronics
+ return unless ($devid & 0xfeff) == 0x0002; # STTS3000
+ } elsif ($chip == 13) {
+ return unless $manid == 0x5400; # MCP
+ return unless ($devid & 0xfcff) == 0x0002; # MCP9804
+ } elsif ($chip == 14) {
+ return unless $manid == 0x1f00; # Atmel
+ return unless ($devid & 0xfeff) == 0x0082; # AT30TS00
}
return 5;
@@ -6620,7 +6769,7 @@
"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();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/prog/pwm/fancontrol new/lm_sensors-3.3.2/prog/pwm/fancontrol
--- old/lm_sensors-3.3.1/prog/pwm/fancontrol 2009-09-16 17:57:53.000000000 +0200
+++ new/lm_sensors-3.3.2/prog/pwm/fancontrol 2011-12-04 17:54:05.000000000 +0100
@@ -49,7 +49,7 @@
echo "Loading configuration from $1 ..."
if [ ! -r "$1" ]
then
- echo "Error: Can't read configuration file"
+ echo "Error: Can't read configuration file" >&2
exit 1
fi
@@ -70,13 +70,13 @@
# Check whether all mandatory settings are set
if [[ -z ${INTERVAL} || -z ${FCTEMPS} || -z ${MINTEMP} || -z ${MAXTEMP} || -z ${MINSTART} || -z ${MINSTOP} ]]
then
- echo "Some mandatory settings missing, please check your config file!"
+ echo "Some mandatory settings missing, please check your config file!" >&2
exit 1
fi
if [ "$INTERVAL" -le 0 ]
then
- echo "Error in configuration file:"
- echo "INTERVAL must be at least 1"
+ echo "Error in configuration file:" >&2
+ echo "INTERVAL must be at least 1" >&2
exit 1
fi
@@ -90,8 +90,8 @@
do
if ! echo $fcv | egrep -q '='
then
- echo "Error in configuration file:"
- echo "FCTEMPS value is improperly formatted"
+ echo "Error in configuration file:" >&2
+ echo "FCTEMPS value is improperly formatted" >&2
exit 1
fi
@@ -110,32 +110,32 @@
# verify the validity of the settings
if [ "${AFCMINTEMP[$fcvcount]}" -ge "${AFCMAXTEMP[$fcvcount]}" ]
then
- echo "Error in configuration file (${AFCPWM[$fcvcount]}):"
- echo "MINTEMP must be less than MAXTEMP"
+ echo "Error in configuration file (${AFCPWM[$fcvcount]}):" >&2
+ echo "MINTEMP must be less than MAXTEMP" >&2
exit 1
fi
if [ "${AFCMAXPWM[$fcvcount]}" -gt 255 ]
then
- echo "Error in configuration file (${AFCPWM[$fcvcount]}):"
- echo "MAXPWM must be at most 255"
+ echo "Error in configuration file (${AFCPWM[$fcvcount]}):" >&2
+ echo "MAXPWM must be at most 255" >&2
exit 1
fi
if [ "${AFCMINSTOP[$fcvcount]}" -ge "${AFCMAXPWM[$fcvcount]}" ]
then
- echo "Error in configuration file (${AFCPWM[$fcvcount]}):"
- echo "MINSTOP must be less than MAXPWM"
+ echo "Error in configuration file (${AFCPWM[$fcvcount]}):" >&2
+ echo "MINSTOP must be less than MAXPWM" >&2
exit 1
fi
if [ "${AFCMINSTOP[$fcvcount]}" -lt "${AFCMINPWM[$fcvcount]}" ]
then
- echo "Error in configuration file (${AFCPWM[$fcvcount]}):"
- echo "MINSTOP must be greater than or equal to MINPWM"
+ echo "Error in configuration file (${AFCPWM[$fcvcount]}):" >&2
+ echo "MINSTOP must be greater than or equal to MINPWM" >&2
exit 1
fi
if [ "${AFCMINPWM[$fcvcount]}" -lt 0 ]
then
- echo "Error in configuration file (${AFCPWM[$fcvcount]}):"
- echo "MINPWM must be at least 0"
+ echo "Error in configuration file (${AFCPWM[$fcvcount]}):" >&2
+ echo "MINPWM must be at least 0" >&2
exit 1
fi
@@ -185,7 +185,7 @@
if [ "`DevicePath "$device"`" != "$path" ]
then
- echo "Device path of $device has changed"
+ echo "Device path of $device has changed" >&2
outdated=1
fi
done
@@ -197,7 +197,7 @@
if [ "`DeviceName "$device"`" != "$name" ]
then
- echo "Device name of $device has changed"
+ echo "Device name of $device has changed" >&2
outdated=1
fi
done
@@ -215,7 +215,7 @@
pwmo=${AFCPWM[$fcvcount]}
if [ ! -w $pwmo ]
then
- echo "Error: file $pwmo doesn't exist"
+ echo "Error: file $pwmo doesn't exist" >&2
outdated=1
fi
let fcvcount=$fcvcount+1
@@ -227,7 +227,7 @@
tsen=${AFCTEMP[$fcvcount]}
if [ ! -r $tsen ]
then
- echo "Error: file $tsen doesn't exist"
+ echo "Error: file $tsen doesn't exist" >&2
outdated=1
fi
let fcvcount=$fcvcount+1
@@ -236,21 +236,24 @@
let fcvcount=0
while (( $fcvcount < ${#AFCFAN[@]} )) # go through all fan inputs
do
- fan=${AFCFAN[$fcvcount]}
- if [ ! -r $fan ]
- then
- echo "Error: file $fan doesn't exist"
- outdated=1
- fi
+ # A given PWM output can control several fans
+ for fan in $(echo ${AFCFAN[$fcvcount]} | sed -e 's/+/ /')
+ do
+ if [ ! -r $fan ]
+ then
+ echo "Error: file $fan doesn't exist" >&2
+ outdated=1
+ fi
+ done
let fcvcount=$fcvcount+1
done
if [ $outdated -eq 1 ]
then
- echo
- echo "At least one referenced file is missing. Either some required kernel"
- echo "modules haven't been loaded, or your configuration file is outdated."
- echo "In the latter case, you should run pwmconfig again."
+ echo >&2
+ echo "At least one referenced file is missing. Either some required kernel" >&2
+ echo "modules haven't been loaded, or your configuration file is outdated." >&2
+ echo "In the latter case, you should run pwmconfig again." >&2
fi
return $outdated
@@ -274,13 +277,13 @@
then
DIR=/sys/bus/i2c/devices
else
- echo "$0: Invalid path to sensors"
+ echo "$0: Invalid path to sensors" >&2
exit 1
fi
if [ ! -d $DIR ]
then
- echo $0: 'No sensors found! (did you load the necessary modules?)'
+ echo $0: 'No sensors found! (did you load the necessary modules?)' >&2
exit 1
fi
cd $DIR
@@ -288,19 +291,19 @@
# Check for configuration change
if [ -z "$DEVPATH" -o -z "$DEVNAME" ]
then
- echo "Configuration is too old, please run pwmconfig again"
+ echo "Configuration is too old, please run pwmconfig again" >&2
exit 1
fi
if ! ValidateDevices "$DEVPATH" "$DEVNAME"
then
- echo "Configuration appears to be outdated, please run pwmconfig again"
+ echo "Configuration appears to be outdated, please run pwmconfig again" >&2
exit 1
fi
CheckFiles || exit 1
if [ -f "$PIDFILE" ]
then
- echo "File $PIDFILE exists, is fancontrol already running?"
+ echo "File $PIDFILE exists, is fancontrol already running?" >&2
exit 1
fi
echo $$ > "$PIDFILE"
@@ -405,12 +408,31 @@
# If fanspeed-sensor output shall be used, do it
if [[ -n ${fan} ]]
then
- read fanval < ${fan}
- if [ $? -ne 0 ]
- then
- echo "Error reading Fan value from $DIR/$fan"
- restorefans 1
- fi
+ min_fanval=100000
+ fanval=
+ # A given PWM output can control several fans
+ for one_fan in $(echo $fan | sed -e 's/+/ /')
+ do
+ read one_fanval < ${one_fan}
+ if [ $? -ne 0 ]
+ then
+ echo "Error reading Fan value from $DIR/$one_fan" >&2
+ restorefans 1
+ fi
+
+ # Remember the minimum, it only matters if it is 0
+ if [ $one_fanval -lt $min_fanval ]
+ then
+ min_fanval=$one_fanval
+ fi
+
+ if [ -z "$fanval" ]
+ then
+ fanval=$one_fanval
+ else
+ fanval="$fanval/$one_fanval"
+ fi
+ done
else
fanval=1 # set it to a non zero value, so the rest of the script still works
fi
@@ -430,6 +452,7 @@
echo "tval=$tval"
echo "pwmpval=$pwmpval"
echo "fanval=$fanval"
+ echo "min_fanval=$min_fanval"
fi
if (( $tval <= $mint ))
@@ -439,7 +462,7 @@
else
# calculate the new value from temperature and settings
pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}"
- if [ $pwmpval -eq 0 -o $fanval -eq 0 ]
+ if [ $pwmpval -eq 0 -o $min_fanval -eq 0 ]
then # if fan was stopped start it using a safe value
echo $minsa > $pwmo
# Sleep while still handling signals
@@ -450,7 +473,7 @@
echo $pwmval > $pwmo # write new value to pwm output
if [ $? -ne 0 ]
then
- echo "Error writing PWM value to $DIR/$pwmo"
+ echo "Error writing PWM value to $DIR/$pwmo" >&2
restorefans 1
fi
if [ "$DEBUG" != "" ]
@@ -469,7 +492,7 @@
pwmenable $pwmo
if [ $? -ne 0 ]
then
- echo "Error enabling PWM on $DIR/$pwmo"
+ echo "Error enabling PWM on $DIR/$pwmo" >&2
restorefans 1
fi
let fcvcount=$fcvcount+1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/prog/sensord/sense.c new/lm_sensors-3.3.2/prog/sensord/sense.c
--- old/lm_sensors-3.3.1/prog/sensord/sense.c 2009-11-05 10:23:46.000000000 +0100
+++ new/lm_sensors-3.3.2/prog/sensord/sense.c 2012-03-06 08:24:42.000000000 +0100
@@ -82,13 +82,21 @@
return (int) (val + 0.5);
}
-static int get_features(const sensors_chip_name *chip,
- const FeatureDescriptor *feature, int action,
- char *label, int alrm, int beep)
+static int do_features(const sensors_chip_name *chip,
+ const FeatureDescriptor *feature, int action)
{
- int i, ret;
+ char *label;
+ const char *formatted;
+ int i, alrm, beep, ret;
double val[MAX_DATA];
+ /* If only scanning, take a quick exit if alarm is off */
+ alrm = get_flag(chip, feature->alarmNumber);
+ if (alrm == -1)
+ return -1;
+ if (action == DO_SCAN && !alrm)
+ return 0;
+
for (i = 0; feature->dataNumbers[i] >= 0; i++) {
ret = sensors_get_value(chip, feature->dataNumbers[i],
val + i);
@@ -101,39 +109,32 @@
}
}
+ /* For RRD, we don't need anything else */
if (action == DO_RRD) {
if (feature->rrd) {
const char *rrded = feature->rrd(val);
- /* FIXME: Jean's review comment:
- * sprintf would me more efficient.
- */
- strcat(strcat (rrdBuff, ":"), rrded ? rrded : "U");
+ sprintf(rrdBuff + strlen(rrdBuff), ":%s",
+ rrded ? rrded : "U");
}
- } else {
- const char *formatted = feature->format(val, alrm, beep);
- if (!formatted) {
- sensorLog(LOG_ERR, "Error formatting sensor data");
- return -1;
- }
-
- if (action == DO_READ) {
- sensorLog(LOG_INFO, " %s: %s", label, formatted);
- } else {
- sensorLog(LOG_ALERT, "Sensor alarm: Chip %s: %s: %s",
- chipName(chip), label, formatted);
- }
+ return 0;
}
- return 0;
-}
-static int do_features(const sensors_chip_name *chip,
- const FeatureDescriptor *feature, int action)
-{
- char *label;
- int alrm, beep;
+ /* For scanning and logging, we need extra information */
+ beep = get_flag(chip, feature->beepNumber);
+ if (beep == -1)
+ return -1;
+
+ formatted = feature->format(val, alrm, beep);
+ if (!formatted) {
+ sensorLog(LOG_ERR, "Error formatting sensor data");
+ return -1;
+ }
+ /* FIXME: It would be more efficient to store the label at
+ * initialization time.
+ */
label = sensors_get_label(chip, feature->feature);
if (!label) {
sensorLog(LOG_ERR, "Error getting sensor label: %s/%s",
@@ -141,17 +142,15 @@
return -1;
}
- alrm = get_flag(chip, feature->alarmNumber);
- if (alrm == -1)
- return -1;
- else if (action == DO_SCAN && !alrm)
- return 0;
+ if (action == DO_READ)
+ sensorLog(LOG_INFO, " %s: %s", label, formatted);
+ else
+ sensorLog(LOG_ALERT, "Sensor alarm: Chip %s: %s: %s",
+ chipName(chip), label, formatted);
- beep = get_flag(chip, feature->beepNumber);
- if (beep == -1)
- return -1;
+ free(label);
- return get_features(chip, feature, action, label, alrm, beep);
+ return 0;
}
static int doKnownChip(const sensors_chip_name *chip,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/prog/sensord/sensord.8 new/lm_sensors-3.3.2/prog/sensord/sensord.8
--- old/lm_sensors-3.3.1/prog/sensord/sensord.8 2009-06-11 19:39:48.000000000 +0200
+++ new/lm_sensors-3.3.2/prog/sensord/sensord.8 2012-03-08 21:36:42.000000000 +0100
@@ -347,7 +347,6 @@
echo OK.
echo -n "Starting sensord: "
daemon sensord
-...
.fi
.PP
Ignore the platform-specific shell functions; the general idea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/prog/sensord/sensord.c new/lm_sensors-3.3.2/prog/sensord/sensord.c
--- old/lm_sensors-3.3.1/prog/sensord/sensord.c 2009-06-20 12:04:52.000000000 +0200
+++ new/lm_sensors-3.3.2/prog/sensord/sensord.c 2012-03-06 08:22:06.000000000 +0100
@@ -204,7 +204,11 @@
} else if (pid != 0) {
fprintf(file, "%d\n", pid);
fclose(file);
- unloadLib();
+
+ freeChips();
+ if (unloadLib())
+ exit(EXIT_FAILURE);
+
exit(EXIT_SUCCESS);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/prog/sensors/chips.c new/lm_sensors-3.3.2/prog/sensors/chips.c
--- old/lm_sensors-3.3.1/prog/sensors/chips.c 2011-03-16 22:31:25.000000000 +0100
+++ new/lm_sensors-3.3.2/prog/sensors/chips.c 2012-03-07 17:12:56.000000000 +0100
@@ -201,10 +201,8 @@
const sensors_feature *feature,
const struct sensor_subfeature_list *sfl,
struct sensor_subfeature_data *limits,
- int max_limits,
int *num_limits,
struct sensor_subfeature_data *alarms,
- int max_alarms,
int *num_alarms)
{
const sensors_subfeature *sf;
@@ -219,33 +217,21 @@
* (it is implied to be active if queued).
*/
if (get_value(name, sf)) {
- if (*num_alarms >= max_alarms) {
- fprintf(stderr,
- "Not enough %s buffers (%d)\n",
- "alarm", max_alarms);
- } else {
- alarms[*num_alarms].name = sfl->name;
- (*num_alarms)++;
- }
+ alarms[*num_alarms].name = sfl->name;
+ (*num_alarms)++;
}
} else {
/*
* Always queue limit subfeatures with their value.
*/
- if (*num_limits >= max_limits) {
- fprintf(stderr,
- "Not enough %s buffers (%d)\n",
- "limit", max_limits);
- } else {
- limits[*num_limits].value = get_value(name, sf);
- limits[*num_limits].name = sfl->name;
- (*num_limits)++;
- }
+ limits[*num_limits].value = get_value(name, sf);
+ limits[*num_limits].name = sfl->name;
+ (*num_limits)++;
}
if (sfl->exists) {
get_sensor_limit_data(name, feature, sfl->exists,
- limits, max_limits, num_limits,
- alarms, max_alarms, num_alarms);
+ limits, num_limits,
+ alarms, num_alarms);
}
}
}
@@ -280,15 +266,24 @@
{ SENSORS_SUBFEATURE_TEMP_CRIT, temp_crit_sensors, 0, "crit" },
{ SENSORS_SUBFEATURE_TEMP_EMERGENCY, temp_emergency_sensors, 0,
"emerg" },
+ { SENSORS_SUBFEATURE_TEMP_LOWEST, NULL, 0, "lowest" },
+ { SENSORS_SUBFEATURE_TEMP_HIGHEST, NULL, 0, "highest" },
{ -1, NULL, 0, NULL }
};
+#define NUM_TEMP_ALARMS 6
+#define NUM_TEMP_SENSORS (ARRAY_SIZE(temp_sensors) \
+ + ARRAY_SIZE(temp_max_sensors) \
+ + ARRAY_SIZE(temp_crit_sensors) \
+ + ARRAY_SIZE(temp_emergency_sensors) \
+ - NUM_TEMP_ALARMS - 4)
+
static void print_chip_temp(const sensors_chip_name *name,
const sensors_feature *feature,
int label_size)
{
- struct sensor_subfeature_data sensors[8];
- struct sensor_subfeature_data alarms[5];
+ struct sensor_subfeature_data sensors[NUM_TEMP_SENSORS];
+ struct sensor_subfeature_data alarms[NUM_TEMP_ALARMS];
int sensor_count, alarm_count;
const sensors_subfeature *sf;
double val;
@@ -321,8 +316,7 @@
sensor_count = alarm_count = 0;
get_sensor_limit_data(name, feature, temp_sensors,
- sensors, ARRAY_SIZE(sensors), &sensor_count,
- alarms, ARRAY_SIZE(alarms), &alarm_count);
+ sensors, &sensor_count, alarms, &alarm_count);
for (i = 0; i < sensor_count; i++) {
if (fahrenheit)
@@ -345,7 +339,7 @@
sens = 4;
printf(" sensor = %s", sens == 0 ? "disabled" :
- sens == 1 ? "diode" :
+ sens == 1 ? "CPU diode" :
sens == 2 ? "transistor" :
sens == 3 ? "thermal diode" :
sens == 4 ? "thermistor" :
@@ -365,17 +359,23 @@
{ SENSORS_SUBFEATURE_IN_MIN, NULL, 0, "min" },
{ SENSORS_SUBFEATURE_IN_MAX, NULL, 0, "max" },
{ SENSORS_SUBFEATURE_IN_CRIT, NULL, 0, "crit max" },
+ { SENSORS_SUBFEATURE_IN_AVERAGE, NULL, 0, "avg" },
+ { SENSORS_SUBFEATURE_IN_LOWEST, NULL, 0, "lowest" },
+ { SENSORS_SUBFEATURE_IN_HIGHEST, NULL, 0, "highest" },
{ -1, NULL, 0, NULL }
};
+#define NUM_IN_ALARMS 5
+#define NUM_IN_SENSORS (ARRAY_SIZE(voltage_sensors) - NUM_IN_ALARMS - 1)
+
static void print_chip_in(const sensors_chip_name *name,
const sensors_feature *feature,
int label_size)
{
const sensors_subfeature *sf;
char *label;
- struct sensor_subfeature_data sensors[4];
- struct sensor_subfeature_data alarms[4];
+ struct sensor_subfeature_data sensors[NUM_IN_SENSORS];
+ struct sensor_subfeature_data alarms[NUM_IN_ALARMS];
int sensor_count, alarm_count;
double val;
@@ -396,8 +396,7 @@
sensor_count = alarm_count = 0;
get_sensor_limit_data(name, feature, voltage_sensors,
- sensors, ARRAY_SIZE(sensors), &sensor_count,
- alarms, ARRAY_SIZE(alarms), &alarm_count);
+ sensors, &sensor_count, alarms, &alarm_count);
print_limits(sensors, sensor_count, alarms, alarm_count, label_size,
"%s = %+6.2f V");
@@ -409,7 +408,7 @@
const sensors_feature *feature,
int label_size)
{
- const sensors_subfeature *sf, *sfmin, *sfdiv;
+ const sensors_subfeature *sf, *sfmin, *sfmax, *sfdiv;
double val;
char *label;
@@ -436,24 +435,36 @@
sfmin = sensors_get_subfeature(name, feature,
SENSORS_SUBFEATURE_FAN_MIN);
+ sfmax = sensors_get_subfeature(name, feature,
+ SENSORS_SUBFEATURE_FAN_MAX);
sfdiv = sensors_get_subfeature(name, feature,
SENSORS_SUBFEATURE_FAN_DIV);
- if (sfmin && sfdiv)
- printf(" (min = %4.0f RPM, div = %1.0f)",
- get_value(name, sfmin),
- get_value(name, sfdiv));
- else if (sfmin)
- printf(" (min = %4.0f RPM)",
- get_value(name, sfmin));
- else if (sfdiv)
- printf(" (div = %1.0f)",
- get_value(name, sfdiv));
+ if (sfmin || sfmax || sfdiv) {
+ printf(" (");
+ if (sfmin)
+ printf("min = %4.0f RPM",
+ get_value(name, sfmin));
+ if (sfmax)
+ printf("%smax = %4.0f RPM",
+ sfmin ? ", " : "",
+ get_value(name, sfmax));
+ if (sfdiv)
+ printf("%sdiv = %1.0f",
+ (sfmin || sfmax) ? ", " : "",
+ get_value(name, sfdiv));
+ printf(")");
+ }
sf = sensors_get_subfeature(name, feature,
SENSORS_SUBFEATURE_FAN_ALARM);
- if (sf && get_value(name, sf)) {
+ sfmin = sensors_get_subfeature(name, feature,
+ SENSORS_SUBFEATURE_FAN_MIN_ALARM);
+ sfmax = sensors_get_subfeature(name, feature,
+ SENSORS_SUBFEATURE_FAN_MAX_ALARM);
+ if ((sf && get_value(name, sf)) ||
+ (sfmin && get_value(name, sfmin)) ||
+ (sfmax && get_value(name, sfmax)))
printf(" ALARM");
- }
printf("\n");
}
@@ -506,6 +517,11 @@
static const struct sensor_subfeature_list power_inst_sensors[] = {
{ SENSORS_SUBFEATURE_POWER_INPUT_LOWEST, NULL, 0, "lowest" },
{ SENSORS_SUBFEATURE_POWER_INPUT_HIGHEST, NULL, 0, "highest" },
+ { SENSORS_SUBFEATURE_POWER_AVERAGE, NULL, 0, "avg" },
+ { SENSORS_SUBFEATURE_POWER_AVERAGE_LOWEST, NULL, 0, "avg lowest" },
+ { SENSORS_SUBFEATURE_POWER_AVERAGE_HIGHEST, NULL, 0, "avg highest" },
+ { SENSORS_SUBFEATURE_POWER_AVERAGE_INTERVAL, NULL, 0,
+ "interval" },
{ -1, NULL, 0, NULL }
};
@@ -517,14 +533,19 @@
{ -1, NULL, 0, NULL }
};
+#define NUM_POWER_ALARMS 4
+#define NUM_POWER_SENSORS (ARRAY_SIZE(power_common_sensors) \
+ + ARRAY_SIZE(power_inst_sensors) \
+ - NUM_POWER_ALARMS - 2)
+
static void print_chip_power(const sensors_chip_name *name,
const sensors_feature *feature,
int label_size)
{
double val;
const sensors_subfeature *sf;
- struct sensor_subfeature_data sensors[6];
- struct sensor_subfeature_data alarms[3];
+ struct sensor_subfeature_data sensors[NUM_POWER_SENSORS];
+ struct sensor_subfeature_data alarms[NUM_POWER_ALARMS];
int sensor_count, alarm_count;
char *label;
const char *unit;
@@ -540,35 +561,50 @@
sensor_count = alarm_count = 0;
- /* Power sensors come in 2 flavors: instantaneous and averaged.
- To keep things simple, we assume that each sensor only implements
- one flavor. */
+ /*
+ * Power sensors come in 2 flavors: instantaneous and averaged.
+ * Most devices only support one flavor, so we try to display the
+ * average power if the instantaneous power attribute does not exist.
+ * If both instantaneous power and average power are supported,
+ * average power is displayed as limit.
+ */
sf = sensors_get_subfeature(name, feature,
SENSORS_SUBFEATURE_POWER_INPUT);
get_sensor_limit_data(name, feature,
sf ? power_inst_sensors : power_avg_sensors,
- sensors, ARRAY_SIZE(sensors), &sensor_count,
- alarms, ARRAY_SIZE(alarms), &alarm_count);
+ sensors, &sensor_count, alarms, &alarm_count);
/* Add sensors common to both flavors. */
- get_sensor_limit_data(name, feature,
- power_common_sensors,
- sensors, ARRAY_SIZE(sensors), &sensor_count,
- alarms, ARRAY_SIZE(alarms), &alarm_count);
+ get_sensor_limit_data(name, feature, power_common_sensors,
+ sensors, &sensor_count, alarms, &alarm_count);
if (!sf)
sf = sensors_get_subfeature(name, feature,
SENSORS_SUBFEATURE_POWER_AVERAGE);
if (sf && get_input_value(name, sf, &val) == 0) {
scale_value(&val, &unit);
- printf("%6.2f %sW ", val, unit);
+ printf("%6.2f %sW%*s", val, unit, 2 - (int)strlen(unit), "");
} else
printf(" N/A ");
- for (i = 0; i < sensor_count; i++)
- scale_value(&sensors[i].value, &sensors[i].unit);
-
+ for (i = 0; i < sensor_count; i++) {
+ /*
+ * Unit is W and needs to be scaled for all attributes except
+ * interval, which does not need to be scaled and is reported in
+ * seconds.
+ */
+ if (strcmp(sensors[i].name, "interval")) {
+ char *tmpstr;
+
+ tmpstr = alloca(4);
+ scale_value(&sensors[i].value, &unit);
+ snprintf(tmpstr, 4, "%sW", unit);
+ sensors[i].unit = tmpstr;
+ } else {
+ sensors[i].unit = "s";
+ }
+ }
print_limits(sensors, sensor_count, alarms, alarm_count,
- label_size, "%s = %6.2f %sW");
+ label_size, "%s = %6.2f %s");
printf("\n");
}
@@ -653,9 +689,15 @@
{ SENSORS_SUBFEATURE_CURR_MIN, NULL, 0, "min" },
{ SENSORS_SUBFEATURE_CURR_MAX, NULL, 0, "max" },
{ SENSORS_SUBFEATURE_CURR_CRIT, NULL, 0, "crit max" },
+ { SENSORS_SUBFEATURE_CURR_AVERAGE, NULL, 0, "avg" },
+ { SENSORS_SUBFEATURE_CURR_LOWEST, NULL, 0, "lowest" },
+ { SENSORS_SUBFEATURE_CURR_HIGHEST, NULL, 0, "highest" },
{ -1, NULL, 0, NULL }
};
+#define NUM_CURR_ALARMS 5
+#define NUM_CURR_SENSORS (ARRAY_SIZE(current_sensors) - NUM_CURR_ALARMS - 1)
+
static void print_chip_curr(const sensors_chip_name *name,
const sensors_feature *feature,
int label_size)
@@ -663,8 +705,8 @@
const sensors_subfeature *sf;
double val;
char *label;
- struct sensor_subfeature_data sensors[4];
- struct sensor_subfeature_data alarms[4];
+ struct sensor_subfeature_data sensors[NUM_CURR_SENSORS];
+ struct sensor_subfeature_data alarms[NUM_CURR_ALARMS];
int sensor_count, alarm_count;
if (!(label = sensors_get_label(name, feature))) {
@@ -684,8 +726,7 @@
sensor_count = alarm_count = 0;
get_sensor_limit_data(name, feature, current_sensors,
- sensors, ARRAY_SIZE(sensors), &sensor_count,
- alarms, ARRAY_SIZE(alarms), &alarm_count);
+ sensors, &sensor_count, alarms, &alarm_count);
print_limits(sensors, sensor_count, alarms, alarm_count, label_size,
"%s = %+6.2f A");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lm_sensors-3.3.1/version.h new/lm_sensors-3.3.2/version.h
--- old/lm_sensors-3.3.1/version.h 2011-07-21 22:36:42.000000000 +0200
+++ new/lm_sensors-3.3.2/version.h 2012-03-14 08:43:39.000000000 +0100
@@ -1 +1 @@
-#define LM_VERSION "3.3.1"
+#define LM_VERSION "3.3.2"
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org