Date: Mon, 14 Jun 2004 10:40:14 -0700 (PDT) From: Nate Lawson <nate@root.org> To: Maxime Henrion <mux@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/apm apm.c Message-ID: <20040614103813.I20782@root.org> In-Reply-To: <20040614165326.BF0CF16A4F1@hub.freebsd.org> References: <20040614165326.BF0CF16A4F1@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040614103813.I20782>