Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 2000 13:14:24 -0600
From:      Warner Losh <imp@village.org>
To:        Hajimu UMEMOTO <ume@mahoroba.org>
Cc:        nsayer@freebsd.org, nsayer@sftw.com, freebsd-hackers@freebsd.org
Subject:   Re: sysctl interface for apm? 
Message-ID:  <200007171914.NAA63275@harmony.village.org>
In-Reply-To: Your message of "Tue, 18 Jul 2000 03:35:14 %2B0900." <20000718.033514.59474907.ume@mahoroba.org> 
References:  <20000718.033514.59474907.ume@mahoroba.org>  <1884.963737703@critter.freebsd.dk> <200007171753.LAA62543@harmony.village.org> <39734D36.5FC7DDA@sftw.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20000718.033514.59474907.ume@mahoroba.org> 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 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?200007171914.NAA63275>