battery: Update AC status on FreeBSD

This commit is contained in:
o9000 2015-08-07 08:08:53 +02:00
parent 8df9ed5977
commit 3a733d7353

View file

@ -68,6 +68,9 @@ int battery_os_update(struct batstate *state) {
state->percentage = sysctl_out;
else
err = -1;
if (sysctlbyname("hw.acpi.acline", &sysctl_out, &len, NULL, 0) == 0)
state->ac_connected = sysctl_out;
return err;
}