Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2012 11:11:11 +0200
From:      Robert Millan <rmh@freebsd.org>
To:        njl@freebsd.org, freebsd-acpi@freebsd.org
Cc:        Steven Chamberlain <steven@pyro.eu.org>
Subject:   [PATCH] Abort powerd when no cpufreq(4) support is found
Message-ID:  <CAOfDtXO=7ALiBVHdY-hHa158yXoM%2BXXigkU4SObPHRr0h-2iUQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi,

I'd like to check-in this patch so that powerd aborts gracefully when
there's no cpufreq(4) support for the CPU in which it is running.

Does this look alright?

-- 
Robert Millan

[-- Attachment #2 --]
Index: usr.sbin/powerd/powerd.c
===================================================================
--- usr.sbin/powerd/powerd.c	(revision 233876)
+++ usr.sbin/powerd/powerd.c	(working copy)
@@ -536,7 +536,7 @@
 		err(1, "lookup kern.cp_times");
 	len = 4;
 	if (sysctlnametomib("dev.cpu.0.freq", freq_mib, &len))
-		err(1, "lookup freq");
+		err(0, "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?CAOfDtXO=7ALiBVHdY-hHa158yXoM%2BXXigkU4SObPHRr0h-2iUQ>