From owner-freebsd-hackers Mon Jul 17 11:35:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id A023F37BB54; Mon, 17 Jul 2000 11:35:36 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:M6JZueHjb68uP36925Np2rgiA9eHm2ealH7KvcbzWGXJygJv3QNz89ltXim64Bqd@localhost [::1]) (authenticated) by peace.mahoroba.org (8.10.2/3.7W-peace) with ESMTP id e6HIZHh17001; Tue, 18 Jul 2000 03:35:17 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Tue, 18 Jul 2000 03:35:14 +0900 (JST) Message-Id: <20000718.033514.59474907.ume@mahoroba.org> To: nsayer@freebsd.org, nsayer@sftw.com Cc: freebsd-hackers@freebsd.org, imp@village.org Subject: Re: sysctl interface for apm? From: Hajimu UMEMOTO In-Reply-To: <39734D36.5FC7DDA@sftw.com> References: <1884.963737703@critter.freebsd.dk> <200007171753.LAA62543@harmony.village.org> <39734D36.5FC7DDA@sftw.com> X-Mailer: xcite1.20> Mew version 1.95b38 on Emacs 20.6 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-OS: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>>>> On Mon, 17 Jul 2000 11:15:18 -0700 >>>>> Nick Sayer said: nsayer> The "why bother" is easy -- one should not have to belong to group nsayer> operator to determine the current battery state. Too many things nsayer> already have to be sgid (at least) without making this another reason. I love this feature. nsayer> I took a middle ground. I have two ints, machdep.apm_battlevel nsayer> and machdep.apm_powerstate. The power state number is nsayer> -1 to 5 for unknown, critical, low, medium, high (which four imply nsayer> battery power), AC or charging (which two imply AC power). Then, I cannot switch to use sysctl. Actually, GKrellM requires ai_batt_stat, ai_acline, ai_batt_life and ai_batt_time members of struct apm_info. -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message