[patch] Reworking HAL's battery handling, was:Trivial error
david at fubar.dk
Mon Nov 27 10:07:27 PST 2006
On Mon, 2006-11-27 at 17:59 +0000, Richard Hughes wrote:
> On Mon, 2006-11-27 at 12:55 -0500, David Zeuthen wrote:
> > On Mon, 2006-11-27 at 16:38 +0000, Richard Hughes wrote:
> > > On Mon, 2006-11-06 at 18:18 -0500, Stu Hood wrote:
> > > > Quick nitpicks:
> > > > * @330 - Slight indentation problem
> > > > * @364 - TRUE in boolean statement
> > > > * @400 - Check against some ratio of bat->last_full instead: For
> > > > instance, (rate > 0.25 * last_full)? (huge/server batteries
> > > > could have rate >50000)
> > > > * @923 - Broken comment
> > > > Otherwise, brilliant!
> > >
> > > David, what do you think? I've fixed these little nits, and really want
> > > to get this in well before the next HAL release.
> > Sure, I thought we were waiting for Danny to OK this? You and Danny are
> > probably better at reviewing this than me...
> I think Danny is somewhat busy with suse stuff.
I've added Danny to this thread.
> > Also, looking at the patch again.. since the new code can remove
> > properties.. is this documented in the spec? Do we do this already? Does
> > g-p-m and kpowersave cope with that?
> It's what we've done for ages with acpi.c - when the battery is removed
> then the properties are removed along with it - or do I misunderstand
> the question?
Reading the code again I see we just set e.g. the rate to zero; I
thought we were removing the property battery.charge_level.rate with
this patch. My bad.
More information about the hal