battery: Update AC status on FreeBSD
This commit is contained in:
@@ -69,6 +69,9 @@ int battery_os_update(struct batstate *state) {
|
||||
else
|
||||
err = -1;
|
||||
|
||||
if (sysctlbyname("hw.acpi.acline", &sysctl_out, &len, NULL, 0) == 0)
|
||||
state->ac_connected = sysctl_out;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user