lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 28 Oct 2006 16:34:52 +0200
From:	"Shem Multinymous" <multinymous@...il.com>
To:	"Richard Hughes" <hughsient@...il.com>
Cc:	"David Woodhouse" <dwmw2@...radead.org>,
	"Dan Williams" <dcbw@...hat.com>, linux-kernel@...r.kernel.org,
	devel@...top.org, sfr@...b.auug.org.au, len.brown@...el.com,
	greg@...ah.com, benh@...nel.crashing.org,
	"David Zeuthen" <davidz@...hat.com>,
	"linux-thinkpad mailing list" <linux-thinkpad@...ux-thinkpad.org>
Subject: Re: [PATCH v2] Re: Battery class driver.

On 10/28/06, Richard Hughes <hughsient@...il.com> wrote:
> On Sat, 2006-10-28 at 13:15 +0100, David Woodhouse wrote:
> >
> > Hm. Again we have the question of whether to export 'threshold_pct'
> > vs.'threshold_abs', or whether to have a separate string property
> > which says what the 'unit' of the threshold is. I don't care much --
> > I'll do whatever DavidZ prefers.
>
> Unit is easier to process in HAL in my opinion.

That's harder for modifiable attributes, because apps need to know the
minimum and maximum values (e.g., for  sane GUI). So it's either
multiple sets, or strings with fixed semantics (say, "percent" and
"capacity"), or adding *_min and *_max read-only attributes.

Speaking of which, battery.h says this:

* Thou shalt not export any attributes in sysfs except these, and
    with these units: */

Drivers *will* want to violate this. For example, the "inhibit
charging for N minutes" command on ThinkPads seems too arcane to be
worthy of generalization. I would add a more sensible boolean
"charging_inhibit" attribute to battery.h, and let the ThinkPad driver
implement it as well as it can. The driver will then expose a
non-stadard "charging_inhibit_minutes" attribute to reveal the finer
level of access to those who care.

  Shem
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ