Battery: refactoring

This commit is contained in:
o9000
2015-11-23 16:12:42 +01:00
parent 8df91bd475
commit 33645f9b5a
6 changed files with 36 additions and 30 deletions

View File

@@ -39,7 +39,7 @@ void battery_os_free()
return;
}
int battery_os_update(struct batstate *state)
int battery_os_update(BatteryState *state)
{
int sysctl_out = 0;
size_t len = sizeof(sysctl_out);
@@ -63,7 +63,7 @@ int battery_os_update(struct batstate *state)
}
if (sysctlbyname("hw.acpi.battery.time", &sysctl_out, &len, NULL, 0) == 0)
batstate_set_time(state, sysctl_out * 60);
battery_state_set_time(state, sysctl_out * 60);
else
err = -1;