Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 2000 11:53:40 -0600
From:      Warner Losh <imp@village.org>
To:        Wes Peters <wes@softweyr.com>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, nsayer@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: sysctl interface for apm? 
Message-ID:  <200007171753.LAA62543@harmony.village.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> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




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