Ignore EPERM from sysctl(3). It is returned when passive cooling
is active. Reviewed by: njl
This commit is contained in:
parent
e71de913d8
commit
f92a4b93c5
@ -29,6 +29,7 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
@ -167,8 +168,10 @@ static int
|
||||
set_freq(int freq)
|
||||
{
|
||||
|
||||
if (sysctl(freq_mib, 4, NULL, NULL, &freq, sizeof(freq)))
|
||||
return (-1);
|
||||
if (sysctl(freq_mib, 4, NULL, NULL, &freq, sizeof(freq))) {
|
||||
if (errno != EPERM)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user