actually updated slstatus and removed binaries
This commit is contained in:
parent
073fdfd5e8
commit
b9ae019df3
12 changed files with 14 additions and 13 deletions
|
|
@ -43,10 +43,10 @@
|
|||
|
||||
if (esnprintf(path, sizeof(path), POWER_SUPPLY_CAPACITY, bat) < 0)
|
||||
return NULL;
|
||||
if (pscanf(path, "%d", &cap_perc) != 1)
|
||||
if (pscanf(path, "%02d", &cap_perc) != 1)
|
||||
return NULL;
|
||||
|
||||
return bprintf("%d", cap_perc);
|
||||
return bprintf("%02d", cap_perc);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
struct apm_power_info apm_info;
|
||||
|
||||
if (load_apm_power_info(&apm_info))
|
||||
return bprintf("%d", apm_info.battery_life);
|
||||
return bprintf("%02d", apm_info.battery_life);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
if (sysctlbyname(BATTERY_LIFE, &cap_perc, &len, NULL, 0) < 0 || !len)
|
||||
return NULL;
|
||||
|
||||
return bprintf("%d", cap_perc);
|
||||
return bprintf("%02d", cap_perc);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue