battery: Update AC status on FreeBSD
This commit is contained in:
parent
8df9ed5977
commit
3a733d7353
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue