mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sysexits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __i386__
|
||||
@ -536,7 +537,7 @@ main(int argc, char * argv[])
|
||||
err(1, "lookup kern.cp_times");
|
||||
len = 4;
|
||||
if (sysctlnametomib("dev.cpu.0.freq", freq_mib, &len))
|
||||
err(1, "lookup freq");
|
||||
err(EX_UNAVAILABLE, "no cpufreq(4) support -- aborting");
|
||||
len = 4;
|
||||
if (sysctlnametomib("dev.cpu.0.freq_levels", levels_mib, &len))
|
||||
err(1, "lookup freq_levels");
|
||||
|
Loading…
Reference in New Issue
Block a user