In message <[EMAIL PROTECTED]> Hajimu UMEMOTO writes:
: 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.

Don't worry, he's not going to change this feature.  I use it and will
fix it back if someone "breaks" it..

: 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.

Yes.  The right answer isn't to kludge this through a sysctl, but
instead it is to fix apm to that it is safe to make it world read
only.  Is there a way inside a ioctl to see if you have something open
for write access?

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to