make it take size after all

This commit is contained in:
2026-05-11 11:01:37 +00:00
parent c26ccba813
commit 574f59b8f5
5 changed files with 8 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ const uint16_t max_metrics_length = 512; // length of the metrics buffer
void gpu_detect(struct gpu_sensors_t *t, const char *pci) {
snprintf(t->hwmon, sizeof(t->hwmon), "/sys/bus/pci/devices/%s/hwmon", pci);
const int ret = get_hwmon_dir(t->hwmon);
const int ret = get_hwmon_dir(t->hwmon, sizeof(t->hwmon));
if (ret != 0) {
t->hwmon[0] = '\0';
applog(LOG_WRN, "Detected GPU hwmon");