cvs commit: src/usr.sbin/powerd powerd.c
Nate Lawson
nate at root.org
Sun Feb 27 02:01:27 GMT 2005
Marcel Moolenaar wrote:
>
> On Feb 26, 2005, at 5:15 PM, Nate Lawson wrote:
>
>> Marcel Moolenaar wrote:
>>
>>> marcel 2005-02-27 00:23:19 UTC
>>> FreeBSD src repository
>>> Modified files:
>>> usr.sbin/powerd powerd.c Log:
>>> Unbreak !i386 platforms. Only i386 has APM, so don't try to fallback
>>> on APM on other platforms.
>>> Revision Changes Path
>>> 1.3 +11 -1 src/usr.sbin/powerd/powerd.c
>>
>>
>> Thanks. It would be cleaner to move this code into apm_init_ac() and
>> acpm_get_ac() functions so the ifdef could be in just one place.
>
>
> Agreed. That would also make it easier to have powerd(8) on platforms
> that have neither APM nor ACPI, but have something else (possibly).
Done. Shouldn't have drunk all that tea (yunnan gold, quite good.)
>> I think there is also one other issue. It would be cleaner to check
>> for the acpi sysctl in the rc.d script and return immediately rather
>> than starting powerd and it bombing out once it discovers this.
>
>
> I'm not sure. I think PowerPC will benefit if powerd(8) grows support
> for wharever is present there. In that light, it makes sense to treat
> powerd(8) as a generic service and thus have it started unconditionally.
>
> Just a thought,
Yep. At least ARM has several cpufreq drivers to learn from in Linux.
I also reread the code and saw that in the case of all AC stuff failing,
we just use the normal policy (-n). So this should work as-is on other
platforms.
--
Nate
More information about the cvs-all
mailing list