cvs commit: src/usr.sbin/apm apm.c
Nate Lawson
nate at root.org
Mon Jun 14 17:40:48 GMT 2004
On Mon, 14 Jun 2004, Maxime Henrion wrote:
> mux 2004-06-14 16:53:20 UTC
>
> FreeBSD src repository
>
> Modified files:
> usr.sbin/apm apm.c
> Log:
> Factor out some duplicated code and fix some style(9) issues.
>
> Submitted by: Liam J. Foy <liamfoy at sepulcrum.org>
>
> Revision Changes Path
> 1.33 +61 -68 src/usr.sbin/apm/apm.c
This looks fine. If you get a chance, it might be nice if you'd look into
this task:
---
Fix drivers and the apm compat interface -- Currently, the apm compat
interface expects byte values but the ABI used is a set of u_ints and an
int. Either the apm or acpi battery drivers (or both) are setting the
value to -1, which results in 0xffffffff being passed back as the current
state. Really, only 255 should be returned in this case. The apm userland
utility marks values >= 255 as "unknown" to work around this. But really
the underlying drivers should be fixed.
---
Note that we can't change the ABI but fixing the sign-extension issue when
the kernel drivers fill out the structures would be helpful.
-Nate
More information about the cvs-src
mailing list