mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-07 23:00:41 +00:00
*** empty log message ***
This commit is contained in:
parent
af7ef68647
commit
c2cc8e33fb
1 changed files with 3 additions and 7 deletions
10
getloadavg.c
10
getloadavg.c
|
@ -436,7 +436,7 @@ static kvm_t *kd;
|
||||||
|
|
||||||
/* Put the 1 minute, 5 minute and 15 minute load averages
|
/* Put the 1 minute, 5 minute and 15 minute load averages
|
||||||
into the first NELEM elements of LOADAVG.
|
into the first NELEM elements of LOADAVG.
|
||||||
Return the number written (never more than 3),
|
Return the number written (never more than 3, but may be less than NELEM),
|
||||||
or -1 if an error occurred. */
|
or -1 if an error occurred. */
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -494,12 +494,8 @@ getloadavg (loadavg, nelem)
|
||||||
struct processor_set_basic_info info;
|
struct processor_set_basic_info info;
|
||||||
unsigned info_count;
|
unsigned info_count;
|
||||||
|
|
||||||
if (nelem > 1)
|
/* We only know how to get the 1-minute average for this system,
|
||||||
{
|
so even if the caller asks for more than 1, we only return 1. */
|
||||||
/* We only know how to get the 1-minute average for this system. */
|
|
||||||
errno = EINVAL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!getloadavg_initialized)
|
if (!getloadavg_initialized)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue