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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148139
@ -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…
Reference in New Issue
Block a user