diff options
| author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2005-07-18 20:15:31 +0000 |
|---|---|---|
| committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2005-07-18 20:15:31 +0000 |
| commit | f92a4b93c57dd52d14205f444ae137ac223e4ff9 (patch) | |
| tree | 9b98c452133d40de2ec2212c4e55ba5ecb5cfebf /usr.sbin | |
| parent | e71de913d894509bba4a9889871566b428e5ffe7 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/powerd/powerd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c index 13f515dc5e79..555218c831b8 100644 --- a/usr.sbin/powerd/powerd.c +++ b/usr.sbin/powerd/powerd.c @@ -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); } |
