From: Michael Tremer Date: Fri, 27 Mar 2026 14:46:48 +0000 (+0000) Subject: sensors: Add a helper "function" to determine the chip name X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3706974af0981fe25fef8b1bbe07becfe3cd0686;p=telemetry.git sensors: Add a helper "function" to determine the chip name Signed-off-by: Michael Tremer --- diff --git a/src/daemon/sensors.c b/src/daemon/sensors.c index ea16eca..70db1b9 100644 --- a/src/daemon/sensors.c +++ b/src/daemon/sensors.c @@ -101,7 +101,7 @@ int __td_sensors_name(char* name, size_t length, int r; // Make the chip name - r = sensors_snprintf_chip_name(chip_name, sizeof(chip_name), chip); + r = td_sensors_chip_name(chip_name, chip); if (r < 0) return r; diff --git a/src/daemon/sensors.h b/src/daemon/sensors.h index fbfe8d2..f98fa13 100644 --- a/src/daemon/sensors.h +++ b/src/daemon/sensors.h @@ -31,6 +31,9 @@ int td_sensors_init(td_ctx* ctx); int td_sensors_cleanup(td_ctx* ctx); +#define td_sensors_chip_name(name, chip) \ + sensors_snprintf_chip_name(name, sizeof(name), chip) + #define td_sensors_name(name, chip, feature) \ __td_sensors_name(name, sizeof(name), chip, feature)