forked from enlightenment/evisum
sensors: fbsd, fix bug
This commit is contained in:
parent
831168115c
commit
82eda9c7ac
|
@ -277,7 +277,7 @@ _power_battery_count_get(power_t *power)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#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)
|
if ((sysctlbyname("hw.acpi.battery.units", &power->battery_count, &len, NULL, 0)) < 0)
|
||||||
power->battery_count = 0;
|
power->battery_count = 0;
|
||||||
|
|
Loading…
Reference in New Issue