]>
Commit | Line | Data |
---|---|---|
a50af14f AB |
1 | Based on patch from Pavel Rochnyack |
2 | https://git.ipfire.org/?p=thirdparty/collectd.git;a=commitdiff;h=d5a3c020d33cc33ee8049f54c7b4dffcd123bf83 | |
3 | ||
4 | diff -Naur collectd-4.10.9/src/sensors.c.orig collectd-4.10.9/src/sensors.c | |
5 | --- collectd-4.10.9/src/sensors.c.orig 2013-04-08 08:26:17.000000000 +0200 | |
6 | +++ collectd-4.10.9/src/sensors.c 2021-04-13 23:17:43.196069346 +0200 | |
7 | @@ -150,7 +150,7 @@ | |
8 | # endif | |
9 | /* #endif SENSORS_API_VERSION < 0x400 */ | |
10 | ||
11 | -#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) | |
12 | +#elif (SENSORS_API_VERSION >= 0x400) | |
13 | typedef struct featurelist | |
14 | { | |
15 | const sensors_chip_name *chip; | |
16 | @@ -162,11 +162,7 @@ | |
17 | # ifndef SENSORS_CONF_PATH | |
18 | # define SENSORS_CONF_PATH "/etc/sensors3.conf" | |
19 | # endif | |
20 | -/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ | |
21 | ||
22 | -#else /* if SENSORS_API_VERSION >= 0x500 */ | |
23 | -# error "This version of libsensors is not supported yet. Please report this " \ | |
24 | - "as bug." | |
25 | #endif | |
26 | ||
27 | static const char *conffile = SENSORS_CONF_PATH; | |
28 | @@ -394,7 +390,7 @@ | |
29 | } /* while sensors_get_detected_chips */ | |
30 | /* #endif SENSORS_API_VERSION < 0x400 */ | |
31 | ||
32 | -#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) | |
33 | +#elif (SENSORS_API_VERSION >= 0x400) | |
34 | chip_num = 0; | |
35 | while ((chip = sensors_get_detected_chips (NULL, &chip_num)) != NULL) | |
36 | { | |
37 | @@ -448,7 +444,7 @@ | |
38 | } /* while (subfeature) */ | |
39 | } /* while (feature) */ | |
40 | } /* while (chip) */ | |
41 | -#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ | |
42 | +#endif /* (SENSORS_API_VERSION >= 0x400) */ | |
43 | ||
44 | if (first_feature == NULL) | |
45 | { | |
46 | @@ -541,7 +537,7 @@ | |
47 | } /* for fl = first_feature .. NULL */ | |
48 | /* #endif SENSORS_API_VERSION < 0x400 */ | |
49 | ||
50 | -#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) | |
51 | +#elif (SENSORS_API_VERSION >= 0x400) | |
52 | for (fl = first_feature; fl != NULL; fl = fl->next) | |
53 | { | |
54 | double value; | |
55 | @@ -576,7 +572,7 @@ | |
56 | ||
57 | sensors_submit (plugin_instance, type, type_instance, value); | |
58 | } /* for fl = first_feature .. NULL */ | |
59 | -#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ | |
60 | +#endif /* (SENSORS_API_VERSION >= 0x400) */ | |
61 | ||
62 | return (0); | |
63 | } /* int sensors_read */ |