sensors: fbsd, fix bug

This commit is contained in:
Alastair Poole 2021-02-26 19:17:32 +00:00
parent 831168115c
commit 82eda9c7ac
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ _power_battery_count_get(power_t *power)
}
}
#elif defined(__FreeBSD__) || defined(__DragonFly__)
size_t len;
size_t len = sizeof(power->battery_count);
if ((sysctlbyname("hw.acpi.battery.units", &power->battery_count, &len, NULL, 0)) < 0)
power->battery_count = 0;