[Pkg-wmaker-commits] [wmbattery] 70/241: * Merge acpi.c changes for more robust AC power status from sleepd 1.3.0.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbattery.
commit 31ae1eda9d574d07fa19ce60dc408793f0b266de
Author: joey <joey at a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Date: Mon Jan 30 22:47:57 2006 +0000
* Merge acpi.c changes for more robust AC power status from sleepd 1.3.0.
---
acpi.c | 10 +++++++++-
debian/changelog | 6 ++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/acpi.c b/acpi.c
index 51ce588..1d96d11 100644
--- a/acpi.c
+++ b/acpi.c
@@ -323,6 +323,10 @@ int acpi_read (int battery, apm_info *info) {
if (state) {
if (state[0] == 'd') { /* discharging */
info->battery_status = BATTERY_STATUS_CHARGING;
+ /* Expensive ac power check used here
+ * because AC power might be on even if a
+ * battery is discharging in some cases. */
+ info->ac_line_status = on_ac_power();
}
else if (state[0] == 'c' && state[1] == 'h') { /* charging */
info->battery_status = BATTERY_STATUS_CHARGING;
@@ -339,6 +343,10 @@ int acpi_read (int battery, apm_info *info) {
}
else if (state[0] == 'c') { /* not charging, so must be critical */
info->battery_status = BATTERY_STATUS_CRITICAL;
+ /* Expensive ac power check used here
+ * because AC power might be on even if a
+ * battery is critical in some cases. */
+ info->ac_line_status = on_ac_power();
}
else if (rate == 0) {
/* if rate is null, battery charged, on
@@ -378,7 +386,7 @@ int acpi_read (int battery, apm_info *info) {
info->battery_time = 0;
info->battery_status = BATTERY_STATUS_ABSENT;
acpi_batt_capacity[battery] = 0;
- if (acpi_batt_count == 1) {
+ if (acpi_batt_count == 0) {
/* Where else would the power come from, eh? ;-) */
info->ac_line_status = 1;
}
diff --git a/debian/changelog b/debian/changelog
index d41ea3a..050104d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+wmbattery (2.25) UNRELEASED; urgency=low
+
+ * Merge acpi.c changes for more robust AC power status from sleepd 1.3.0.
+
+ -- Joey Hess <joeyh at debian.org> Mon, 30 Jan 2006 17:44:20 -0500
+
wmbattery (2.24) unstable; urgency=low
* Current policy.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git
More information about the Pkg-wmaker-commits
mailing list