Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2012 20:59:14 +0000 (UTC)
From:      Robert Millan <rmh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234070 - head/usr.sbin/powerd
Message-ID:  <201204092059.q39KxE0q078053@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmh
Date: Mon Apr  9 20:59:14 2012
New Revision: 234070
URL: http://svn.freebsd.org/changeset/base/234070

Log:
  Improve error reporting when no cpufreq(4) support is available.
  
  Reviewed by:	njl, acpi

Modified:
  head/usr.sbin/powerd/powerd.c

Modified: head/usr.sbin/powerd/powerd.c
==============================================================================
--- head/usr.sbin/powerd/powerd.c	Mon Apr  9 20:55:23 2012	(r234069)
+++ head/usr.sbin/powerd/powerd.c	Mon Apr  9 20:59:14 2012	(r234070)
@@ -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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204092059.q39KxE0q078053>