Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jul 2000 23:25:04 -0700 (PDT)
From:      <nsayer@FreeBSD.org>
To:        hackers@FreeBSD.org
Subject:   sysctl interface for apm?
Message-ID:  <200007160625.XAA92886@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007160625.XAA92886>