summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-06-28 06:30:51 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-06-28 06:30:51 +0000
commit3cb26831cfe4e8c16a35c88170284d5c7dcfadf7 (patch)
tree7b0779f6a3263413af80a7e6013ed586c809030b /sys-apps/lm_sensors/files
parentVersion Bump (diff)
downloadhistorical-3cb26831cfe4e8c16a35c88170284d5c7dcfadf7.tar.gz
historical-3cb26831cfe4e8c16a35c88170284d5c7dcfadf7.tar.bz2
historical-3cb26831cfe4e8c16a35c88170284d5c7dcfadf7.zip
reroll the patch because of CRs and patch-2.5.9 sucking, also upstream trac sucks
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/lm_sensors/files')
-rw-r--r--sys-apps/lm_sensors/files/lm_sensors-3.1.2-changeset_r5835.patch115
1 files changed, 61 insertions, 54 deletions
diff --git a/sys-apps/lm_sensors/files/lm_sensors-3.1.2-changeset_r5835.patch b/sys-apps/lm_sensors/files/lm_sensors-3.1.2-changeset_r5835.patch
index d7d9d3cf4176..d0fb9c15ddcf 100644
--- a/sys-apps/lm_sensors/files/lm_sensors-3.1.2-changeset_r5835.patch
+++ b/sys-apps/lm_sensors/files/lm_sensors-3.1.2-changeset_r5835.patch
@@ -1,54 +1,61 @@
-http://bugs.gentoo.org/325083
-http://www.lm-sensors.org/changeset/5835
-
---- prog/sensord/rrd.c
-+++ prog/sensord/rrd.c
-@@ -138,7 +138,9 @@
- }
-
-+/* Returns the number of features processed, or -1 on error */
- static int _applyToFeatures(FeatureFN fn, void *data,
- const sensors_chip_name *chip,
-- const ChipDescriptor *desc)
-+ const ChipDescriptor *desc,
-+ int labelOffset)
- {
- int i;
-@@ -148,5 +150,5 @@
- char *label;
-
-- for (i = 0; i < MAX_RRD_SENSORS && features[i].format; ++i) {
-+ for (i = 0; labelOffset + i < MAX_RRD_SENSORS && features[i].format; ++i) {
- feature = features + i;
- rawLabel = feature->feature->name;
-@@ -159,9 +161,9 @@
- }
-
-- rrdCheckLabel(rawLabel, i);
-- fn(data, rrdLabels[i], label, feature);
-+ rrdCheckLabel(rawLabel, labelOffset + i);
-+ fn(data, rrdLabels[labelOffset + i], label, feature);
- free(label);
- }
-- return 0;
-+ return i;
- }
-
-@@ -185,5 +187,5 @@
- static int applyToFeatures(FeatureFN fn, void *data)
- {
-- int i, i_detected, ret;
-+ int i, i_detected, ret, labelOffset = 0;
- const sensors_chip_name *chip, *chip_arg;
- ChipDescriptor *desc;
-@@ -198,7 +200,8 @@
- continue;
-
-- ret = _applyToFeatures(fn, data, chip, desc);
-- if (ret)
-+ ret = _applyToFeatures(fn, data, chip, desc, labelOffset);
-+ if (ret < 0)
- return ret;
-+ labelOffset += ret;
- }
- }
+--- prog/sensord/rrd.c
++++ prog/sensord/rrd.c
+@@ -137,9 +137,11 @@
+ }
+ }
+
++/* Returns the number of features processed, or -1 on error */
+ static int _applyToFeatures(FeatureFN fn, void *data,
+ const sensors_chip_name *chip,
+- const ChipDescriptor *desc)
++ const ChipDescriptor *desc,
++ int labelOffset)
+ {
+ int i;
+ const FeatureDescriptor *features = desc->features;
+@@ -147,7 +149,7 @@
+ const char *rawLabel;
+ char *label;
+
+- for (i = 0; i < MAX_RRD_SENSORS && features[i].format; ++i) {
++ for (i = 0; labelOffset + i < MAX_RRD_SENSORS && features[i].format; ++i) {
+ feature = features + i;
+ rawLabel = feature->feature->name;
+
+@@ -158,11 +160,11 @@
+ return -1;
+ }
+
+- rrdCheckLabel(rawLabel, i);
+- fn(data, rrdLabels[i], label, feature);
++ rrdCheckLabel(rawLabel, labelOffset + i);
++ fn(data, rrdLabels[labelOffset + i], label, feature);
+ free(label);
+ }
+- return 0;
++ return i;
+ }
+
+ static ChipDescriptor *lookup_known_chips(const sensors_chip_name *chip)
+@@ -184,7 +186,7 @@
+
+ static int applyToFeatures(FeatureFN fn, void *data)
+ {
+- int i, i_detected, ret;
++ int i, i_detected, ret, labelOffset = 0;
+ const sensors_chip_name *chip, *chip_arg;
+ ChipDescriptor *desc;
+
+@@ -197,9 +199,10 @@
+ if (!desc)
+ continue;
+
+- ret = _applyToFeatures(fn, data, chip, desc);
+- if (ret)
++ ret = _applyToFeatures(fn, data, chip, desc, labelOffset);
++ if (ret < 0)
+ return ret;
++ labelOffset += ret;
+ }
+ }
+ return 0;