Improve error reporting when no cpufreq(4) support is available.

Reviewed by:	njl, acpi
This commit is contained in:
Robert Millan 2012-04-09 20:59:14 +00:00
parent 453856145c
commit 7b3b368344

View File

@ -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");