mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Improve error reporting when no cpufreq(4) support is available.
Reviewed by: njl, acpi
This commit is contained in:
parent
453856145c
commit
7b3b368344
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234070
@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sysexits.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
@ -536,7 +537,7 @@ main(int argc, char * argv[])
|
|||||||
err(1, "lookup kern.cp_times");
|
err(1, "lookup kern.cp_times");
|
||||||
len = 4;
|
len = 4;
|
||||||
if (sysctlnametomib("dev.cpu.0.freq", freq_mib, &len))
|
if (sysctlnametomib("dev.cpu.0.freq", freq_mib, &len))
|
||||||
err(1, "lookup freq");
|
err(EX_UNAVAILABLE, "no cpufreq(4) support -- aborting");
|
||||||
len = 4;
|
len = 4;
|
||||||
if (sysctlnametomib("dev.cpu.0.freq_levels", levels_mib, &len))
|
if (sysctlnametomib("dev.cpu.0.freq_levels", levels_mib, &len))
|
||||||
err(1, "lookup freq_levels");
|
err(1, "lookup freq_levels");
|
||||||
|
Loading…
Reference in New Issue
Block a user