From owner-freebsd-hackers Sat Jul 15 23:25: 6 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id F0B3937B52C for ; Sat, 15 Jul 2000 23:25:04 -0700 (PDT) (envelope-from nsayer@FreeBSD.org) Received: (from nsayer@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id XAA92886 for hackers; Sat, 15 Jul 2000 23:25:04 -0700 (PDT) (envelope-from nsayer@FreeBSD.org) Date: Sat, 15 Jul 2000 23:25:04 -0700 (PDT) From: Message-Id: <200007160625.XAA92886@freefall.freebsd.org> To: hackers@FreeBSD.org Subject: sysctl interface for apm? Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I was paging through the distributed.net client changelog and they had a note there basically asking for a sysctl interface to apm -- in short, they wanted the ability for non-root users to detect power state (AC/batt) and battery level. At first, I wondered why they regarded this differently from opening /dev/apm and doing the requisite ioctl()s. Then I looked at /dev/apm's permissions and saw the problem. 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? :-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message