From owner-freebsd-hackers Mon Jul 17 10:54:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id D431F37BA81; Mon, 17 Jul 2000 10:54:07 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id LAA81147; Mon, 17 Jul 2000 11:54:05 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id LAA62543; Mon, 17 Jul 2000 11:53:40 -0600 (MDT) Message-Id: <200007171753.LAA62543@harmony.village.org> To: Wes Peters Subject: Re: sysctl interface for apm? Cc: Poul-Henning Kamp , nsayer@FreeBSD.ORG, hackers@FreeBSD.ORG In-reply-to: Your message of "Sun, 16 Jul 2000 11:48:36 MDT." <3971F574.B492B904@softweyr.com> References: <3971F574.B492B904@softweyr.com> <1884.963737703@critter.freebsd.dk> Date: Mon, 17 Jul 2000 11:53:40 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <3971F574.B492B904@softweyr.com> Wes Peters writes: : Poul-Henning Kamp wrote: : > : > In message <200007160625.XAA92886@freefall.freebsd.org>, nsayer@FreeBSD.ORG wri : > tes: : > : > >So what does everyone think? Is it suitable to add a read only : > >sysctl 'machdep.apm_powerstate' that reports either AC, nn%, : > >or N/A ? Or should the format be numeric (999 = AC, <=100 = battery %, : > >-1 = N/A)? Or should we not bother? :-) : > : > yes it is suitable. : : Perhaps machdep.apm.powerstate, leaving room in the namespace for other : apm parameters? Charging state and battery life leap immediately to : mind. No. DO NOT CALL IT APM. APM is i386 specific and is doing its best to die off in favor acpi. If you must call it apm, do *NOT* cause being on AC power to override the batery %. These are two different things and should be reported as such. machdep.apm.battery: 0..100 (for battery percentage) machdep.apm.runtime: 0.. (for the reported battery life remaining) machdep.apm.ac: 0 1 (1 means we're running off AC) machdep.apm.charging: 0 1 machdep.apm.batteries: 0.. (number of batteries apm says are there) But why bother? The apm command gives you this already. :-) Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message