From owner-cvs-all@FreeBSD.ORG Sun Feb 27 01:27:18 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56D8816A4CE; Sun, 27 Feb 2005 01:27:18 +0000 (GMT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFA3743D4C; Sun, 27 Feb 2005 01:27:17 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.250] (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.13.1/8.13.1) with ESMTP id j1R1RGQB092948; Sat, 26 Feb 2005 17:27:16 -0800 (PST) (envelope-from marcel@xcllnt.net) In-Reply-To: <42211F1D.30801@root.org> References: <20050227002323.AEFC716A55A@hub.freebsd.org> <42211F1D.30801@root.org> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Sat, 26 Feb 2005 17:27:15 -0800 To: Nate Lawson X-Mailer: Apple Mail (2.619.2) cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/powerd powerd.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Feb 2005 01:27:18 -0000 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). > 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, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net