[patch] Move negative checks to util.c, from acpi.c (resend)

Richard Hughes hughsient at gmail.com
Sat Aug 20 13:49:09 PDT 2005


On Sat, 2005-08-20 at 20:01 +0200, Danny Kukawka wrote:
> Hi,
> 
> I found a little problem with your patch for util.c. I think in the case if 
> the computed percentage is bigger than 100% (e.g. 108%) we should furthermore 
> give return 100% and not -1. 
> 
> The reason is, as always ;), ACPI on different machines. The related machines 
> returns the first time of discharging a higher 'remaining capacity' then the 
> 'last full capacity'. For us it approved to return 100 % in this cases.
> 
> What you think?

Looks good to me. Logically it makes sense to keep percentage 0..100, so
my vote is yes.

Richard.



More information about the hal mailing list