2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-01 14:55:27 +00:00

Fix support of multiple chip names on the command line. It got broken

accidentally during the conversion to the new libsensors API in version
3.0.0. This closes ticket #2321.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5252 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2008-05-12 11:51:18 +00:00
parent 0f2d2724a6
commit aa47fb99e2
3 changed files with 6 additions and 2 deletions

View File

@@ -8,12 +8,14 @@ SVN-HEAD
Late compute statements override early ones Late compute statements override early ones
Support virtual hwmon devices (#2309) Support virtual hwmon devices (#2309)
Support power and energy sensors Support power and energy sensors
Support DOS-style configuration files again (#2284)
pwmconfig: Don't create the configuration file before it's needed pwmconfig: Don't create the configuration file before it's needed
Don't preserve configuration file customizations Don't preserve configuration file customizations
Fix permissions of the configuration file Fix permissions of the configuration file
Don't start if fancontrol is running (#2299) Don't start if fancontrol is running (#2299)
fancontrol: Don't start if already running (#2299) fancontrol: Don't start if already running (#2299)
Delete fancontrol.pid at exit time (#2299) Delete fancontrol.pid at exit time (#2299)
sensord: Fix support of multiple chip names on the command line (#2321)
sensors: Print energy and power sensors with automatically scaled units sensors: Print energy and power sensors with automatically scaled units
sensors-detect: Add SMSC SCH5027D detection sensors-detect: Add SMSC SCH5027D detection
Do not access I/O ports on PPC Do not access I/O ports on PPC

View File

@@ -136,9 +136,10 @@ static int
applyToFeatures applyToFeatures
(FeatureFN fn, void *data) { (FeatureFN fn, void *data) {
const sensors_chip_name *chip; const sensors_chip_name *chip;
int i = 0, j, ret = 0, num = 0; int i, j, ret = 0, num = 0;
for (j = 0; (ret == 0) && (j < numChipNames); ++ j) { for (j = 0; (ret == 0) && (j < numChipNames); ++ j) {
i = 0;
while ((ret == 0) && ((chip = sensors_get_detected_chips (&chipNames[j], &i)) != NULL)) { while ((ret == 0) && ((chip = sensors_get_detected_chips (&chipNames[j], &i)) != NULL)) {
int index0, chipindex = -1; int index0, chipindex = -1;
for (index0 = 0; knownChips[index0].features; ++ index0) for (index0 = 0; knownChips[index0].features; ++ index0)

View File

@@ -170,9 +170,10 @@ static int
doChips doChips
(int action) { (int action) {
const sensors_chip_name *chip; const sensors_chip_name *chip;
int i = 0, j, ret = 0; int i, j, ret = 0;
for (j = 0; (ret == 0) && (j < numChipNames); ++ j) { for (j = 0; (ret == 0) && (j < numChipNames); ++ j) {
i = 0;
while ((ret == 0) && ((chip = sensors_get_detected_chips (&chipNames[j], &i)) != NULL)) { while ((ret == 0) && ((chip = sensors_get_detected_chips (&chipNames[j], &i)) != NULL)) {
ret = doChip (chip, action); ret = doChip (chip, action);
} }