From owner-cvs-all@FreeBSD.ORG Mon Jun 14 17:40:48 2004 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 0E3D116A4D2 for ; Mon, 14 Jun 2004 17:40:48 +0000 (GMT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id D439E43D48 for ; Mon, 14 Jun 2004 17:40:47 +0000 (GMT) (envelope-from nate@root.org) Received: (qmail 20804 invoked by uid 1000); 14 Jun 2004 17:40:14 -0000 Date: Mon, 14 Jun 2004 10:40:14 -0700 (PDT) From: Nate Lawson To: Maxime Henrion In-Reply-To: <20040614165326.BF0CF16A4F1@hub.freebsd.org> Message-ID: <20040614103813.I20782@root.org> References: <20040614165326.BF0CF16A4F1@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/apm apm.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: Mon, 14 Jun 2004 17:40:48 -0000 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 > > 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