forked from enlightenment/enlightenment
sysinfo: fix single-core OpenBSD results.
Summary: Basically missed this one. CPU_STATES is 6 as it's still supposedly a work-in-progress. But we only need 5 for all queries (for now). Reviewers: stephenmhouston, zmike! Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5070
This commit is contained in:
parent
1a622a68ed
commit
6bd2d74cdc
|
@ -89,7 +89,7 @@ _cpumonitor_sysctl_getusage(unsigned long *prev_total, unsigned long *prev_idle,
|
|||
return;
|
||||
|
||||
unsigned long total = 0;
|
||||
for (j = 0; j < CPU_STATES; j++)
|
||||
for (j = 0; j < CPU_STATES - 1; j++)
|
||||
total += cpu_times[j];
|
||||
|
||||
unsigned long idle = cpu_times[4];
|
||||
|
|
Loading…
Reference in New Issue