[Bug #4600] fix to battery plugin acpi percent>100

[email protected]
Newsgroups gmane.comp.desktop.xfce.goodies.devel
Message-ID <[email protected]>
Bug #4600, was updated on 2005-Jul-16 18:22
Here is a current snapshot of the bug.

Project: Goodies for the Xfce desktop
Category: xfce4-battery-plugin
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: aurther
Assigned to : none
Summary: fix to battery plugin acpi percent>100

Details: ACPI battery percent is shown as greater than zero. This is due to a quirk in the way kernel reports battery capacity in /proc/

Result is that when the battery is fully charged the plugin spits out an error message every second and shows battery percentage >100

Fix:
to file libacpi.c

560c560
<             acpistate->percentage = percent;
---
>             acpistate->percentage = (percent>100?100:percent);

(sorry for the haphazard bug report... but i have a feeling that this code is not being maintained)

For detailed info, follow this link:
http://developer.berlios.de/bugs/?func=detailbug&bug_id=4600&group_id=910
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.